I had to add a NumBlockersMinus1 param to the AttackerBlocked trigger due to TriggerCount not working in a second level of xMath

This commit is contained in:
slapshot5
2011-10-05 05:03:31 +00:00
parent 5734bedc06
commit 57301b9193
2 changed files with 2 additions and 0 deletions

View File

@@ -1869,6 +1869,7 @@ public class CombatUtil {
if (!a.getCreatureGotBlockedThisCombat()) {
final int blockers = AllZone.getCombat().getBlockers(a).size();
runParams.put("NumBlockers", blockers);
runParams.put("NumBlockersMinus1", blockers - 1);
AllZone.getTriggerHandler().runTrigger("AttackerBlocked", runParams);
//Bushido

View File

@@ -60,5 +60,6 @@ public class Trigger_AttackerBlocked extends Trigger {
sa.setTriggeringObject("Attacker", runParams.get("Attacker"));
sa.setTriggeringObject("Blocker", runParams.get("Blocker"));
sa.setTriggeringObject("NumBlockers", runParams.get("NumBlockers"));
sa.setTriggeringObject("NumBlockersMinus1", runParams.get("NumBlockersMinus1"));
}
}