+- +-


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

+-Stats ezBlock

Total Members: 139
Latest: KindredSpirit
New This Month: 0
New This Week: 0
New Today: 0
Total Posts: 686
Total Topics: 336
Most Online Today: 4
Most Online Ever: 20
(June 30, 2017, 12:18:50 AM)
Users Online
Members: 0
Guests: 2
Total: 2

Author Topic: Help applying bonus damage (x + modifier) to class powers  (Read 726 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.


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)
        bonus = #attrbonus[attrCha]

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


+-Recent Topics

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

Making Utility Powers? by dmayhew469
July 07, 2017, 02:11:16 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

Add the INit modifier for Battle Harness by dmayhew469
June 15, 2017, 08:27:12 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

As we look at Making Card Headers correct colors by dracusmage
February 23, 2017, 03:24:01 PM

Question Involving Twofold Pact for Warlock by dracusmage
February 16, 2017, 02:52:32 AM

Daily Powers by Charlie
February 15, 2017, 06:31:00 PM

Missing Fighter? by dracusmage
February 13, 2017, 10:41:45 PM

Armor at Paragon and above by dracusmage
February 13, 2017, 06:52:16 PM

Help applying bonus damage (x + modifier) to class powers by Fox Lee
January 18, 2017, 06:16:49 AM

Cavalier Summon Steed Patch by Fox Lee
January 15, 2017, 01:00:56 AM

Powered by EzPortal