MCPcopy Create free account
hub / github.com/Card-Forge/forge / isAttacking

Method isAttacking

forge-game/src/main/java/forge/game/combat/Combat.java:334–342  ·  view source on GitHub ↗
(Card card, GameEntity defender)

Source from the content-addressed store, hash-verified

332 }
333
334 public boolean isAttacking(Card card, GameEntity defender) {
335 AttackingBand ab = getBandOfAttacker(card);
336 for (Entry<GameEntity, AttackingBand> ee : attackedByBands.get().entries()) {
337 if (ee.getValue() == ab) {
338 return ee.getKey() == defender;
339 }
340 }
341 return false;
342 }
343
344 /**
345 * Checks if a card is currently attacking, returns false if the card is not currently attacking, even if its LKI was.

Callers 15

updateAttackingMethod · 0.95
cardHasPropertyMethod · 0.95
resolveMethod · 0.95
resolveMethod · 0.95
isAttackingAiMethod · 0.95
shouldPumpCardMethod · 0.95
doAristocratLogicMethod · 0.95
considerMethod · 0.95

Calls 6

getBandOfAttackerMethod · 0.95
valuesMethod · 0.80
getMethod · 0.65
containsMethod · 0.65
getValueMethod · 0.45
getKeyMethod · 0.45

Tested by

no test coverage detected