+- +-

+-User

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

+-Stats ezBlock

Members
Total Members: 124
Latest: tzrlk
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 672
Total Topics: 332
Most Online Today: 2
Most Online Ever: 20
(June 30, 2017, 12:18:50 AM)
Users Online
Members: 0
Guests: 4
Total: 4

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

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

How to allow resistance show up by dmayhew469
June 12, 2017, 04:05:57 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

Fey Beast Companions (HotF) by Fox Lee
January 12, 2017, 07:49:08 PM

Has anyone worked with the Warlock (Binder) by SAbel
December 29, 2016, 11:43:17 PM

I will be posting an update soon by SAbel
December 24, 2016, 01:32:41 AM

Weapon Critical damage display by Paragon
December 02, 2016, 06:05:46 PM

Powered by EzPortal