Is it possible to reference a character's weapon type in a formula? I want to have an ability for one of my characters that adds their attack to their defense when equipped with axes.
Reference Weapon Type in Formula
RPG Maker VXAce Support
Code:
wtype_equipped?(id)
Code:
x = 0; x = a.def if (a.actor? and a.wtype_equipped?(1)); (a.atk + x) * 4 - b.def * 2
Code:
class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # * Determine if Specific Type of Weapon Is Equipped #-------------------------------------------------------------------------- def wtype_equipped?(wtype_id) false endend
Code:
x = 0; x = a.def if a.wtype_equipped?(1); (a.atk + x) * 4 - b.def * 2
Code:
x = a.wtype_equipped?(1) ? a.def : 0; (a.atk + x) * 4 - b.def * 2
Thanks, this thread can be closed now.
Original thread: https://forums.rpgmakerweb.com/threads/reference-weapon-type-in-formula.35758/