-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/set4-bunch11
- Loading branch information
Showing
34 changed files
with
1,028 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { EventCard } from '../../../core/card/EventCard'; | ||
import AbilityHelper from '../../../AbilityHelper'; | ||
import { WildcardCardType, ZoneName } from '../../../core/Constants'; | ||
|
||
export default class CoordinatedFront extends EventCard { | ||
protected override getImplementationId() { | ||
return { | ||
id: '9595202461', | ||
internalName: 'coordinated-front', | ||
}; | ||
} | ||
|
||
public override setupCardAbilities() { | ||
this.setEventAbility({ | ||
title: 'Give a ground unit and a space unit +2/+2 for this phase', | ||
targetResolvers: { | ||
groundUnit: { | ||
activePromptTitle: 'Give a ground unit +2/+2 for this phase', | ||
optional: true, | ||
cardTypeFilter: WildcardCardType.Unit, | ||
zoneFilter: ZoneName.GroundArena, | ||
immediateEffect: AbilityHelper.immediateEffects.forThisPhaseCardEffect({ | ||
effect: AbilityHelper.ongoingEffects.modifyStats({ power: 2, hp: 2 }) | ||
}) | ||
}, | ||
spaceUnit: { | ||
activePromptTitle: 'Give a space unit +2/+2 for this phase', | ||
optional: true, | ||
cardTypeFilter: WildcardCardType.Unit, | ||
zoneFilter: ZoneName.SpaceArena, | ||
immediateEffect: AbilityHelper.immediateEffects.forThisPhaseCardEffect({ | ||
effect: AbilityHelper.ongoingEffects.modifyStats({ power: 2, hp: 2 }) | ||
}) | ||
}, | ||
}, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { EventCard } from '../../../core/card/EventCard'; | ||
import { CardType, WildcardCardType, ZoneName } from '../../../core/Constants'; | ||
import AbilityHelper from '../../../AbilityHelper'; | ||
|
||
export default class ShootDown extends EventCard { | ||
protected override getImplementationId() { | ||
return { | ||
id: '7730475388', | ||
internalName: 'shoot-down', | ||
}; | ||
} | ||
|
||
public override setupCardAbilities() { | ||
this.setEventAbility({ | ||
title: 'Deal 3 damage to space unit.', | ||
targetResolver: { | ||
zoneFilter: ZoneName.SpaceArena, | ||
cardTypeFilter: WildcardCardType.Unit, | ||
immediateEffect: AbilityHelper.immediateEffects.damage({ amount: 3 }) | ||
}, | ||
ifYouDo: { | ||
title: 'Deal 2 damage to a base', | ||
optional: true, | ||
ifYouDoCondition: (ifYouDoContext) => ifYouDoContext.events[0].willDefeat, | ||
immediateEffect: AbilityHelper.immediateEffects.selectCard({ | ||
activePromptTitle: 'Deal 2 damage to a base', | ||
cardTypeFilter: CardType.Base, | ||
innerSystem: AbilityHelper.immediateEffects.damage({ amount: 2 }) | ||
}) | ||
} | ||
}); | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
server/game/cards/04_JTL/units/ChewbaccaFaithfulFirstMate.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import AbilityHelper from '../../../../../server/game/AbilityHelper'; | ||
import { NonLeaderUnitCard } from '../../../../../server/game/core/card/NonLeaderUnitCard'; | ||
import { AbilityRestriction } from '../../../../../server/game/core/Constants'; | ||
|
||
export default class ChewbaccaFaithfulFirstMate extends NonLeaderUnitCard { | ||
protected override getImplementationId() { | ||
return { | ||
id: '7208848194', | ||
internalName: 'chewbacca#faithful-first-mate', | ||
}; | ||
} | ||
|
||
public override setupCardAbilities() { | ||
this.addConstantAbility({ | ||
title: 'This unit can\'t be defeated or returned to hand by enemy card abilities', | ||
ongoingEffect: [ | ||
AbilityHelper.ongoingEffects.cardCannot({ | ||
cannot: AbilityRestriction.ReturnToHand, | ||
restrictedActionCondition: (context) => context.player !== this.controller, | ||
}), | ||
AbilityHelper.ongoingEffects.cardCannot({ | ||
cannot: AbilityRestriction.BeDefeated, | ||
restrictedActionCondition: (context) => context.player !== this.controller, | ||
}) | ||
] | ||
}); | ||
|
||
this.addPilotingConstantAbilityTargetingAttached({ | ||
title: 'This unit can\'t be captured or damaged by enemy card abilities', | ||
ongoingEffect: [ | ||
AbilityHelper.ongoingEffects.cardCannot({ | ||
cannot: AbilityRestriction.ReturnToHand, | ||
restrictedActionCondition: (context) => context.player !== this.controller, | ||
}), | ||
AbilityHelper.ongoingEffects.cardCannot({ | ||
cannot: AbilityRestriction.BeDefeated, | ||
restrictedActionCondition: (context) => context.player !== this.controller, | ||
}) | ||
] | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { NonLeaderUnitCard } from '../../../core/card/NonLeaderUnitCard'; | ||
import AbilityHelper from '../../../AbilityHelper'; | ||
|
||
export default class CorporateDefenseShuttle extends NonLeaderUnitCard { | ||
protected override getImplementationId() { | ||
return { | ||
id: '4332645242', | ||
internalName: 'corporate-defense-shuttle', | ||
}; | ||
} | ||
|
||
public override setupCardAbilities() { | ||
this.addConstantAbility({ | ||
title: 'This unit can\'t attack', | ||
ongoingEffect: AbilityHelper.ongoingEffects.cannotAttack() | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import AbilityHelper from '../../../AbilityHelper'; | ||
import { NonLeaderUnitCard } from '../../../core/card/NonLeaderUnitCard'; | ||
import { KeywordName, Trait } from '../../../core/Constants'; | ||
|
||
export default class FlankingFangFighter extends NonLeaderUnitCard { | ||
protected override getImplementationId () { | ||
return { | ||
id: '0626954301', | ||
internalName: 'flanking-fang-fighter', | ||
}; | ||
} | ||
|
||
public override setupCardAbilities () { | ||
this.addConstantAbility({ | ||
title: 'While you control another Fighter unit, this unit gains Raid 2', | ||
condition: (context) => context.player.isTraitInPlay(Trait.Fighter, context.source), | ||
ongoingEffect: AbilityHelper.ongoingEffects.gainKeyword({ keyword: KeywordName.Raid, amount: 2 }) | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import AbilityHelper from '../../../AbilityHelper'; | ||
import { NonLeaderUnitCard } from '../../../core/card/NonLeaderUnitCard'; | ||
import { EventName, TargetMode } from '../../../core/Constants'; | ||
|
||
export default class KimogilaHeavyFighter extends NonLeaderUnitCard { | ||
protected override getImplementationId () { | ||
return { | ||
id: '6757031085', | ||
internalName: 'kimogila-heavy-fighter', | ||
}; | ||
} | ||
|
||
private filterUnitsDamagedThatCanBeExhausted(events) { | ||
return events | ||
.filter((event) => event.name === EventName.OnDamageDealt) | ||
.filter((event) => event.card.canBeExhausted()) | ||
.map((event) => event.card); | ||
} | ||
|
||
public override setupCardAbilities () { | ||
this.addTriggeredAbility({ | ||
title: 'Deal 3 indirect damage to a player', | ||
when: { | ||
onCardPlayed: (event, context) => event.card === context.source, | ||
}, | ||
targetResolver: { | ||
mode: TargetMode.Player, | ||
immediateEffect: AbilityHelper.immediateEffects.indirectDamageToPlayer({ amount: 3 }) | ||
}, | ||
then: (thenContext) => ({ | ||
title: 'Exhaust each unit damaged this way.', | ||
thenCondition: () => this.filterUnitsDamagedThatCanBeExhausted(thenContext.events).length > 0, | ||
immediateEffect: AbilityHelper.immediateEffects.exhaust({ | ||
target: this.filterUnitsDamagedThatCanBeExhausted(thenContext.events), | ||
}) | ||
}) | ||
}); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
server/game/cards/04_JTL/units/MillenniumFalconGetOutAndPush.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import AbilityHelper from '../../../AbilityHelper'; | ||
import type { Card } from '../../../core/card/Card'; | ||
import { NonLeaderUnitCard } from '../../../core/card/NonLeaderUnitCard'; | ||
import { Trait } from '../../../core/Constants'; | ||
|
||
export default class MillenniumFalconGetOutAndPush extends NonLeaderUnitCard { | ||
protected override getImplementationId () { | ||
return { | ||
id: '8845408332', | ||
internalName: 'millennium-falcon#get-out-and-push', | ||
}; | ||
} | ||
|
||
public override setupCardAbilities () { | ||
this.addConstantAbility({ | ||
title: 'You may play or deploy 1 additional Pilot on this unit', | ||
ongoingEffect: AbilityHelper.ongoingEffects.modifyPilotingLimit({ amount: 1 }) | ||
}); | ||
|
||
this.addConstantAbility({ | ||
title: 'This unit gets +1/+0 for each Pilot on it', | ||
ongoingEffect: AbilityHelper.ongoingEffects.modifyStats((target) => ({ | ||
power: target.upgrades.reduce((count: number, upgrade: Card) => count + (upgrade.hasSomeTrait(Trait.Pilot) ? 1 : 0), 0), | ||
hp: 0 | ||
})), | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import AbilityHelper from '../../../AbilityHelper'; | ||
import { NonLeaderUnitCard } from '../../../core/card/NonLeaderUnitCard'; | ||
import { WildcardZoneName } from '../../../core/Constants'; | ||
|
||
export default class R2D2Artooooooooo extends NonLeaderUnitCard { | ||
protected override getImplementationId () { | ||
return { | ||
id: '5375722883', | ||
internalName: 'r2d2#artooooooooo', | ||
}; | ||
} | ||
|
||
public override setupCardAbilities () { | ||
this.addPilotingConstantAbilityTargetingAttached({ | ||
title: 'You may play or deploy 1 additional Pilot on this unit', | ||
ongoingEffect: AbilityHelper.ongoingEffects.modifyPilotingLimit({ amount: 1 }) | ||
}); | ||
|
||
this.addConstantAbility({ | ||
title: 'This upgrade can be played on a friendly Vehicle unit with a Pilot on it.', | ||
sourceZoneFilter: WildcardZoneName.Any, | ||
ongoingEffect: AbilityHelper.ongoingEffects.ignorePilotingPilotLimit(), | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.