oasis-b

Docs / Battle system

LW_Counters

Battle system
RPG Maker MV and MZ counter attack plugin

Counter attacks with their own skills, conditions, a limit per turn, dodge or take-the-hit counters and counters on counters.

Battle Essentials ($9.99)Full Collection ($19.99)

Needs LW_Core (LWZ_Core in MZ) above all Living World plugins in the Plugin Manager. It's included in every pack.

LW_Counters in a test project

Counter attacks with their own skills and rules.

Highlights

Ideas for your game

Works well with

LW_BattleFlowLW_TauntLW_StateRules

Introduction

Works with plain MV and with LW_BattleFlow. With LW_BattleFlow, a counter plays the steps of its skill like any other action.

The counter rate (CNT) of a battler still decides if it counters. Then the first counter skill that can be used and whose conditions pass is taken, looking at states, weapons, armors, class, actor or enemy, code and at last the fallback counter. Counters wait until the attacker's action is over and then run one after the other.

Notes

Actor or enemy:

<LW Fallback Counter: 5>        or a skill name, 0 = its attack skill

Actor, class, enemy, weapon, armor or state:

<LW Counter Skills: 5, 6>       <LW Counter Skills: 5 to 8>
<LW Counter Skill: Riposte>
<LW Counters Per Turn: +1>
<LW Counter Rate On Targets: 50%>   targets of this battler counter
<LW Counter Rate On Targets: -10%>  half as often, or 10 points less
<LW Dodge Counter>              dodge the hit, then counter
<LW Take Hit Counter>           take the hit, then counter (wins)
<LW Counter Skills Code>
if (user.hpRate() < 0.5) skills.push(10);
</LW Counter Skills Code>
<LW Counters Per Turn Code>
value += user.level >= 30 ? 1 : 0;
</LW Counters Per Turn Code>
<LW Counter Rate On Targets Code>
rate -= user.hpRate() / 2;
</LW Counter Rate On Targets Code>

Skill or item that is attacking:

<LW No Counter>                 can't be countered
<LW Allies Can Counter>         <LW Allies Cannot Counter>
<LW Counter Rate: 50%>          <LW Counter Rate: +20%>
<LW Counter Rate Code>
rate += target.hpRate();
</LW Counter Rate Code>

Skill used as a counter:

<LW Dodge Counter>   <LW Take Hit Counter>
<LW Counter Name: Riposte>      <LW Counter Icon: 77>
<LW Counter If>
physical hit
attacker hp% <= 50
switch 10 on
</LW Counter If>
<LW Counter If Code>
condition = attacker.isEnemy();
</LW Counter If Code>

Every line of <LW Counter If> must pass. "not" in front turns a line around:

attacker hp% <= 50       defender level > 10
    stats: level mhp hp mmp mp maxtp tp atk def mat mdf agi luk
    hp% mp% tp%
certain hit   physical hit   magical hit   counter hit
single target   several targets
element Fire   element 4      (of the attack)
skill Fire   item 3   skill type Magic
chance 30%   switch 10 on   variable 15 >= 15
code attacker.name() === 'Harold'

Code can use attacker, defender, user (the one countering), target (the attacker), action, skill, a, b, s and v.

Notes written for older counter plugins are read as well.

For Other Plugins

battler.lwCounterSkills()     skill ids in the order they are tried
battler.lwCountersLeft()      counters left this turn

Terms of Use

See TERMS_OF_USE.txt in the download. Short version: use it in as many of your own games as you like, free or commercial. Edit it for your game, but keep this header. Don't share or resell the plugin files on their own. Name oasis-b in the credits of your game.

Changelog

Version 1.0.0 - 2026-11-22 - First release.

Introduction

Works with plain MV and with LWZ_BattleFlow. With LWZ_BattleFlow, a counter plays the steps of its skill like any other action.

The counter rate (CNT) of a battler still decides if it counters. Then the first counter skill that can be used and whose conditions pass is taken, looking at states, weapons, armors, class, actor or enemy, code and at last the fallback counter. Counters wait until the attacker's action is over and then run one after the other.

Notes

Actor or enemy:

<LW Fallback Counter: 5>        or a skill name, 0 = its attack skill

Actor, class, enemy, weapon, armor or state:

<LW Counter Skills: 5, 6>       <LW Counter Skills: 5 to 8>
<LW Counter Skill: Riposte>
<LW Counters Per Turn: +1>
<LW Counter Rate On Targets: 50%>   targets of this battler counter
<LW Counter Rate On Targets: -10%>  half as often, or 10 points less
<LW Dodge Counter>              dodge the hit, then counter
<LW Take Hit Counter>           take the hit, then counter (wins)
<LW Counter Skills Code>
if (user.hpRate() < 0.5) skills.push(10);
</LW Counter Skills Code>
<LW Counters Per Turn Code>
value += user.level >= 30 ? 1 : 0;
</LW Counters Per Turn Code>
<LW Counter Rate On Targets Code>
rate -= user.hpRate() / 2;
</LW Counter Rate On Targets Code>

Skill or item that is attacking:

<LW No Counter>                 can't be countered
<LW Allies Can Counter>         <LW Allies Cannot Counter>
<LW Counter Rate: 50%>          <LW Counter Rate: +20%>
<LW Counter Rate Code>
rate += target.hpRate();
</LW Counter Rate Code>

Skill used as a counter:

<LW Dodge Counter>   <LW Take Hit Counter>
<LW Counter Name: Riposte>      <LW Counter Icon: 77>
<LW Counter If>
physical hit
attacker hp% <= 50
switch 10 on
</LW Counter If>
<LW Counter If Code>
condition = attacker.isEnemy();
</LW Counter If Code>

Every line of <LW Counter If> must pass. "not" in front turns a line around:

attacker hp% <= 50       defender level > 10
    stats: level mhp hp mmp mp maxtp tp atk def mat mdf agi luk
    hp% mp% tp%
certain hit   physical hit   magical hit   counter hit
single target   several targets
element Fire   element 4      (of the attack)
skill Fire   item 3   skill type Magic
chance 30%   switch 10 on   variable 15 >= 15
code attacker.name() === 'Harold'

Code can use attacker, defender, user (the one countering), target (the attacker), action, skill, a, b, s and v.

Notes written for older counter plugins are read as well.

For Other Plugins

battler.lwCounterSkills()     skill ids in the order they are tried
battler.lwCountersLeft()      counters left this turn

Terms of Use

See TERMS_OF_USE.txt in the download. Short version: use it in as many of your own games as you like, free or commercial. Edit it for your game, but keep this header. Don't share or resell the plugin files on their own. Name oasis-b in the credits of your game.

Changelog

Version 1.0.0 - First release for MZ.

Get it

LW_Counters is in these packs. Every pack comes as an MV and an MZ download at the same price and needs no other plugin collection. Tested in RPG Maker MV 1.6.2 and MZ 1.10.0 games on Windows, macOS and Linux and in current browsers.

Battle Essentials ($9.99)Full Collection ($19.99)
← LW_DamageStepsLW_Formation →