mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Add some internal documentation to Spell.copySpell
This commit is contained in:
parent
4b7b79009d
commit
c985ba3938
1 changed files with 10 additions and 0 deletions
|
@ -809,6 +809,16 @@ public class Spell extends StackObjectImpl implements Card {
|
||||||
// copy spell
|
// copy spell
|
||||||
Spell spellCopy = new Spell(copiedPart, this.ability.copySpell(this.card, copiedPart), this.controllerId, this.fromZone, game, true);
|
Spell spellCopy = new Spell(copiedPart, this.ability.copySpell(this.card, copiedPart), this.controllerId, this.fromZone, game, true);
|
||||||
UUID copiedSourceId = spellCopy.ability.getSourceId();
|
UUID copiedSourceId = spellCopy.ability.getSourceId();
|
||||||
|
|
||||||
|
// non-fused spell:
|
||||||
|
// spellAbilities.get(0) is alias (NOT copy) of this.ability
|
||||||
|
// spellAbilities.get(1) is first spliced card (if any)
|
||||||
|
// fused spell:
|
||||||
|
// spellAbilities.get(0) is left half
|
||||||
|
// spellAbilities.get(1) is right half
|
||||||
|
// spellAbilities.get(2) is first spliced card (if any)
|
||||||
|
// for non-fused spell, main spellAbility was already added in constructor and must not be copied again
|
||||||
|
// for fused spell, all of spellAbilities must be copied here
|
||||||
boolean skipFirst = (this.ability.getSpellAbilityType() != SpellAbilityType.SPLIT_FUSED);
|
boolean skipFirst = (this.ability.getSpellAbilityType() != SpellAbilityType.SPLIT_FUSED);
|
||||||
for (SpellAbility spellAbility : this.getSpellAbilities()) {
|
for (SpellAbility spellAbility : this.getSpellAbilities()) {
|
||||||
if (skipFirst) {
|
if (skipFirst) {
|
||||||
|
|
Loading…
Reference in a new issue