- Joined
- Mar 30, 2017
- Messages
- 4
- Reaction score
- 0
- First Language
- English
- Primarily Uses
- RMMV
Specifically, the section I want to change is this, line 591 to 600 in Scene_Battle:
I want to change that "target.item_cnt" to be the target's cnt vs the atacker's cnt. (target cnt - attacker cnt.)
I'm pretty sure no rounding when the number is negative is necessary, as rand is positive, so even -100% results in no counter.
Any idea as to how I would go about doing this? How would I add the attacker's CNT into this?
If this involves an external script, it must be compatible with: Most Yanfly scripts, Fomar0153's ATB system, and Victor Core.
Not sure if this would help, but here's an example of an incompatible script of similar purpose (no battle animations play, which is vital for Galv's Timed Button Attacks): Hamedo: Improve Counter Attack
Code:
#--------------------------------------------------------------------------
# * Invoke Skill/Item
#--------------------------------------------------------------------------
def invoke_item(target, item)
if rand < target.item_cnt(@subject, item) # <--- THIS LINE
invoke_counter_attack(target, item)
elsif rand < target.item_mrf(@subject, item)
invoke_magic_reflection(target, item)
else
apply_item_effects(apply_substitute(target, item), item)
end
@subject.last_target_index = target.index
end
I'm pretty sure no rounding when the number is negative is necessary, as rand is positive, so even -100% results in no counter.
Any idea as to how I would go about doing this? How would I add the attacker's CNT into this?
If this involves an external script, it must be compatible with: Most Yanfly scripts, Fomar0153's ATB system, and Victor Core.
Not sure if this would help, but here's an example of an incompatible script of similar purpose (no battle animations play, which is vital for Galv's Timed Button Attacks): Hamedo: Improve Counter Attack


