mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
* Slice onto arcane - Fixed a bug that splice cards of opponents were counted as own splice cards. Leading to lock down the client.
This commit is contained in:
parent
63783d9fe2
commit
3572cbdc87
1 changed files with 3 additions and 3 deletions
|
@ -351,13 +351,13 @@ public class ContinuousEffects implements Serializable {
|
|||
* @param game
|
||||
* @return
|
||||
*/
|
||||
private List<SpliceCardEffect> getApplicableSpliceCardEffects(Game game) {
|
||||
private List<SpliceCardEffect> getApplicableSpliceCardEffects(Game game, UUID playerId) {
|
||||
List<SpliceCardEffect> spliceEffects = new ArrayList<SpliceCardEffect>();
|
||||
|
||||
for (SpliceCardEffect effect: spliceCardEffects) {
|
||||
HashSet<Ability> abilities = spliceCardEffects.getAbility(effect.getId());
|
||||
for (Ability ability : abilities) {
|
||||
if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, null, false)) {
|
||||
if (ability.getControllerId().equals(playerId) && (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, null, false))) {
|
||||
if (effect.getDuration() != Duration.OneUse || !effect.isUsed()) {
|
||||
spliceEffects.add(effect);
|
||||
break;
|
||||
|
@ -442,7 +442,7 @@ public class ContinuousEffects implements Serializable {
|
|||
// on a spliced ability of a spell can't be spliced again
|
||||
return;
|
||||
}
|
||||
List<SpliceCardEffect> spliceEffects = getApplicableSpliceCardEffects(game);
|
||||
List<SpliceCardEffect> spliceEffects = getApplicableSpliceCardEffects(game, abilityToModify.getControllerId());
|
||||
// get the applyable splice abilities
|
||||
List<SpliceOntoArcaneAbility> spliceAbilities = new ArrayList<SpliceOntoArcaneAbility>();
|
||||
for (SpliceCardEffect effect : spliceEffects) {
|
||||
|
|
Loading…
Reference in a new issue