mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
- Refactored Greatbow Doyen.
This commit is contained in:
parent
a2a560264a
commit
2729dbeb09
1 changed files with 3 additions and 2 deletions
|
@ -107,9 +107,10 @@ class GreatbowDoyenTriggeredAbility extends TriggeredAbilityImpl<GreatbowDoyenTr
|
|||
if (event.getType() == GameEvent.EventType.DAMAGED_CREATURE) {
|
||||
Permanent creature = game.getPermanent(event.getSourceId());
|
||||
Permanent damagedCreature = game.getPermanent(event.getTargetId());
|
||||
if (creature.getCardType().contains(CardType.CREATURE) && damagedCreature != null
|
||||
if (creature != null && damagedCreature != null
|
||||
&& creature.getCardType().contains(CardType.CREATURE)
|
||||
&& creature.getSubtype().contains("Archer")
|
||||
&& creature.getControllerId().equals(controllerId) && creature != null) {
|
||||
&& creature.getControllerId().equals(controllerId)) {
|
||||
this.getEffects().get(0).setValue("damageAmount", event.getAmount());
|
||||
this.getEffects().get(0).setValue("controller", damagedCreature.getControllerId());
|
||||
this.getEffects().get(0).setValue("source", event.getSourceId());
|
||||
|
|
Loading…
Reference in a new issue