mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00: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
|
||||
public boolean apply(Game game, Ability source) {
|
||||
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)) {
|
||||
Permanent permanent = game.getPermanent(target);
|
||||
if (permanent != null) {
|
||||
rustTick.addConnectedCard("HisokasGuard", permanent.getId());
|
||||
rustTick.addConnectedCard("RustTick", permanent.getId());
|
||||
permanent.tap(game);
|
||||
} else {
|
||||
return false;
|
||||
|
@ -135,8 +135,8 @@ class RustTickRestrictionEffect extends RestrictionEffect<RustTickRestrictionEff
|
|||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
Permanent rustTick = game.getPermanent(source.getSourceId());
|
||||
if (rustTick != null && rustTick.isTapped()) {
|
||||
if (rustTick.getConnectedCards("HisokasGuard").size() > 0) {
|
||||
UUID target = rustTick.getConnectedCards("HisokasGuard").get(0);
|
||||
if (rustTick.getConnectedCards("RustTick").size() > 0) {
|
||||
UUID target = rustTick.getConnectedCards("RustTick").get(0);
|
||||
if (target != null && target.equals(permanent.getId())) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue