mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
- changed getPermanent to getPermanentOrLKIBattlefield
- changed == operator to equals()
This commit is contained in:
parent
8b427de2d3
commit
1f759f9291
5 changed files with 10 additions and 10 deletions
|
@ -101,12 +101,12 @@ class CurseOfBountyTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent enchantment = game.getPermanent(this.getSourceId());
|
||||
Permanent enchantment = game.getPermanentOrLKIBattlefield(this.getSourceId());
|
||||
UUID controller = this.getControllerId();
|
||||
if (enchantment != null
|
||||
&& enchantment.getAttachedTo() != null
|
||||
&& game.getCombat().getPlayerDefenders(game).contains(enchantment.getAttachedTo())) {
|
||||
if (game.getCombat().getAttackerId() != controller) {
|
||||
if (!game.getCombat().getAttackerId().equals(controller)) {
|
||||
for (Effect effect: this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackerId()));
|
||||
}
|
||||
|
|
|
@ -98,12 +98,12 @@ class CurseOfDisturbanceTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent enchantment = game.getPermanent(this.getSourceId());
|
||||
Permanent enchantment = game.getPermanentOrLKIBattlefield(this.getSourceId());
|
||||
UUID controller = this.getControllerId();
|
||||
if (enchantment != null
|
||||
&& enchantment.getAttachedTo() != null
|
||||
&& game.getCombat().getPlayerDefenders(game).contains(enchantment.getAttachedTo())) {
|
||||
if (game.getCombat().getAttackerId() != controller) {
|
||||
if (!game.getCombat().getAttackerId().equals(controller)) {
|
||||
for (Effect effect: this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackerId()));
|
||||
}
|
||||
|
|
|
@ -99,12 +99,12 @@ class CurseOfOpulenceTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent enchantment = game.getPermanent(this.getSourceId());
|
||||
Permanent enchantment = game.getPermanentOrLKIBattlefield(this.getSourceId());
|
||||
UUID controller = this.getControllerId();
|
||||
if (enchantment != null
|
||||
&& enchantment.getAttachedTo() != null
|
||||
&& game.getCombat().getPlayerDefenders(game).contains(enchantment.getAttachedTo())) {
|
||||
if (game.getCombat().getAttackerId() != controller) {
|
||||
if (!game.getCombat().getAttackerId().equals(controller)) {
|
||||
for (Effect effect: this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackerId()));
|
||||
}
|
||||
|
|
|
@ -97,12 +97,12 @@ class CurseOfVerbosityTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent enchantment = game.getPermanent(this.getSourceId());
|
||||
Permanent enchantment = game.getPermanentOrLKIBattlefield(this.getSourceId());
|
||||
UUID controller = this.getControllerId();
|
||||
if (enchantment != null
|
||||
&& enchantment.getAttachedTo() != null
|
||||
&& game.getCombat().getPlayerDefenders(game).contains(enchantment.getAttachedTo())) {
|
||||
if (game.getCombat().getAttackerId() != controller) {
|
||||
if (!game.getCombat().getAttackerId().equals(controller)) {
|
||||
for (Effect effect: this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackerId()));
|
||||
}
|
||||
|
|
|
@ -97,12 +97,12 @@ class CurseOfVitalityTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent enchantment = game.getPermanent(this.getSourceId());
|
||||
Permanent enchantment = game.getPermanentOrLKIBattlefield(this.getSourceId());
|
||||
UUID controller = this.getControllerId();
|
||||
if (enchantment != null
|
||||
&& enchantment.getAttachedTo() != null
|
||||
&& game.getCombat().getPlayerDefenders(game).contains(enchantment.getAttachedTo())) {
|
||||
if (game.getCombat().getAttackerId() != controller) {
|
||||
if (!game.getCombat().getAttackerId().equals(controller)) {
|
||||
for (Effect effect: this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackerId()));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue