Fixed Rust Tick

This commit is contained in:
North 2012-09-06 15:42:14 +03:00
parent b1a4fada8a
commit 1c40723e5a

View file

@ -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;
}