mirror of
https://github.com/correl/mage.git
synced 2025-03-16 09:16:26 -09:00
Fixed Rust Tick
This commit is contained in:
parent
b1a4fada8a
commit
1c40723e5a
1 changed files with 4 additions and 4 deletions
|
@ -96,11 +96,11 @@ class RustTickTapTargetEffect extends TapTargetEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent rustTick = game.getPermanent(source.getSourceId());
|
Permanent rustTick = game.getPermanent(source.getSourceId());
|
||||||
if (rustTick != null) rustTick.clearConnectedCards("HisokasGuard");
|
if (rustTick != null) rustTick.clearConnectedCards("RustTick");
|
||||||
for (UUID target : targetPointer.getTargets(game, source)) {
|
for (UUID target : targetPointer.getTargets(game, source)) {
|
||||||
Permanent permanent = game.getPermanent(target);
|
Permanent permanent = game.getPermanent(target);
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
rustTick.addConnectedCard("HisokasGuard", permanent.getId());
|
rustTick.addConnectedCard("RustTick", permanent.getId());
|
||||||
permanent.tap(game);
|
permanent.tap(game);
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
@ -135,8 +135,8 @@ class RustTickRestrictionEffect extends RestrictionEffect<RustTickRestrictionEff
|
||||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||||
Permanent rustTick = game.getPermanent(source.getSourceId());
|
Permanent rustTick = game.getPermanent(source.getSourceId());
|
||||||
if (rustTick != null && rustTick.isTapped()) {
|
if (rustTick != null && rustTick.isTapped()) {
|
||||||
if (rustTick.getConnectedCards("HisokasGuard").size() > 0) {
|
if (rustTick.getConnectedCards("RustTick").size() > 0) {
|
||||||
UUID target = rustTick.getConnectedCards("HisokasGuard").get(0);
|
UUID target = rustTick.getConnectedCards("RustTick").get(0);
|
||||||
if (target != null && target.equals(permanent.getId())) {
|
if (target != null && target.equals(permanent.getId())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue