+- +-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Stats ezBlock

Members
Total Members: 138
Latest: KindredSpirit
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 707
Total Topics: 342
Most Online Today: 5
Most Online Ever: 20
(June 30, 2017, 12:18:50 AM)
Users Online
Members: 0
Guests: 8
Total: 8

Author Topic: Help applying bonus damage (x + modifier) to class powers  (Read 738 times)

Fox Lee

  • Newbie
  • *
  • Posts: 31
  • She Bites
    • View Profile
    • Invincible Ink
Help applying bonus damage (x + modifier) to class powers
« on: January 18, 2017, 06:16:49 AM »
For the last couple of days, I've been working on the vampire. It's almost done, but I'm having trouble with one class feature, which gives them a scaling bonus to damage with vampire class and vampire paragon path powers.

First - I've had to use a feat bonus - poking around a bit, it seems like there's no intended way to apply an untyped bonus? If anybody can provide insight into that (even just the valid name for a less common bonus type, since feat is pretty much the most likely to conflict with other stuff) that would be superb.

Second - The code below SEEMS to be working (for base class powers only, obv), but HeroLab reports it weirdly. Instead of reading like 1d8 + 5, power damage reads like 1d8  + 3 (Cha) +2. At level 5+, the damage breakdown line appears, and reads like Damage breakdown: +6 = Ability (+4), Hidden Might (+2).

The value IS right, but it's not being totalled up with the rest of the damage, which I thought it should be? It's not great what I'm used to seeing. I assume this means there's something wrong with my code, so if anybody can glance at it and tell me if there's something clearly wrong, I'd be very grateful.

Thanks!

Code: [Select]
      ~work out what our damage bonus should be
      var bonus as number
      if (hero.tagvalue[Level.?] >= 25) then
        bonus = (#attrbonus[attrCha] + 6)
      elseif (hero.tagvalue[Level.?] >= 15) then
        bonus = (#attrbonus[attrCha] + 4)
      elseif (hero.tagvalue[Level.?] >= 5) then
        bonus = (#attrbonus[attrCha] + 2)
      else
        bonus = #attrbonus[attrCha]
        endif

      ~Add bonus to class powers
      foreach pick in hero from Power where "PowerClass.clsVampire"
        perform eachpick.field[pwDamFeat].modify[+,bonus,""]
       nexteach

 

+-Recent Topics

War Wizard's Expertise by SAbel
July 14, 2018, 09:26:27 AM

GenCon 2018 by SAbel
July 14, 2018, 12:17:41 AM

Rhythm Blade by SAbel
July 13, 2018, 11:07:16 PM

Critical hit damage by SAbel
July 05, 2018, 09:28:40 PM

Summoned and companion ect by SAbel
July 05, 2018, 09:26:46 PM

Druids by SAbel
July 05, 2018, 09:24:16 PM

Add the INit modifier for Battle Harness by SAbel
July 05, 2018, 09:19:35 PM

Making Utility Powers? by SAbel
July 01, 2018, 09:12:03 PM

Race Rebuild (All) by SAbel
July 01, 2018, 09:05:34 PM

Hero Lab v8.5 messed up 4e by Charlie
April 30, 2018, 11:03:57 PM

Color for Encounter Powers by Charlie
March 10, 2018, 10:57:11 PM

How to allow resistance show up by Charlie
December 06, 2017, 12:56:04 AM

Total Newb... but... by Johnny B Evil
November 26, 2017, 07:52:48 AM

Feat Valenar Weapon Training by Eldyn
October 13, 2017, 08:53:03 PM

4e license question by Cryptoknight
June 25, 2017, 09:28:29 PM

Remove/increase limit on Temporary Adjustment value? by Fox Lee
June 22, 2017, 07:30:45 PM

Change Attack Ability by dmayhew469
June 15, 2017, 07:57:20 PM

Would somebody like to take this over? by dmayhew469
June 09, 2017, 02:02:12 PM

Inherent Bonuses by dmayhew469
June 09, 2017, 01:59:28 PM

No Class or Race options by rkjanik
June 06, 2017, 01:57:21 AM

Spy by Mckinley
May 25, 2017, 02:06:57 AM

Is there a guide out for how to build a race by SAbel
May 05, 2017, 11:59:46 PM

Please read this and weigh in - Issue/Source/Document Version Control System by Charlie
April 27, 2017, 09:54:40 PM

Request Access to the CodePlex System by Charlie
March 03, 2017, 10:47:03 PM

Vampire class by Fox Lee
February 26, 2017, 05:29:29 AM

Powered by EzPortal