Skill Template?

I'm not sure if this would fall under Ace support or RGSS3 support, but I'll try it here.

Say I wanted to make a more complicated skill. In this case let's say it has to do with doing more damage depending on the number of states afflicted. If the skill was too long for the formula box, you'd put it in a script;

class Game_Battler < Game_BattlerBase   def status_attack(a,      c = 0      e = a.atk * 2 - b.def * 1      for d in [2,3,4,5,6,7]      if a.state?(d)          c += 1         end      end return e if c == 0   return e * 1.1 if c == 1   return e * 1.3 if c == 2   #so on and so forth   endendOr something like that. If I were to use a skill like this, could I put this in the formula box to modify the strength for a more powerful version of the skill?

Code:
status_attack(a,; e * 2#Or something like this?status_attack(a,; e = a.atk * 4 - b.def * 2
I think it should work, but keep in mind that this wont work how you expect it:

status_attack(a,; e * 2lets say status_attack(a, 😎 returns 100 now it would look like this:

100; e * 2Your final damage would be only e * 2 but e is unknown. You would neet to change it to this:

e = status_attack(a,; e * 2or this:

status_attack(a, * 2Greetings
Another simple way to do it.

class Game_Battler < Game_BattlerBase def status_attack(a,b,p) # where "p" modifies the skill's power. c = 0 e = (a.atk * 2 - b.def * 1) * (p / 100) for d in [2,3,4,5,6,7] if a.state?(d) c += 1 end end return e if c == 0 return e * 1.1 if c == 1 return e * 1.3 if c == 2 #so on and so forth endendWhere "p" is equal to the skill's power. Place it anywhere you want in the formula.

status_attack(a,b,100)"100" is the percentage to modify the skill's damage by. Again, there's a lot of different ways to do this.

Code:
class Game_Battler < Game_BattlerBase   def status_attack(a,b,f)      c = 0      e = (a.atk * 2 - b.def * 1)      for d in [2,3,4,5,6,7]         if a.state?(d)            c += 1         end      end   return e if c < 1   return e * (f * c)   #so on and so forth   endend
Code:
 status_attack(a,b,2)

Original thread: https://forums.rpgmakerweb.com/threads/skill-template.39895/