Integrate Ecaz Duke revival and bounded Mirror Weapon battles
This commit is contained in:
1 parent
68d782ca82
commit
3b118dd845
39 files changed
+1377
-533
No files matched your search
@@ -5,6 +5,7 @@ import {
|
||||
weaponTypes,
|
||||
defenseTypes,
|
||||
} from './battle-cards';
|
||||
import { resolveBattleWeapons, type EffectiveWeapon } from './effective-weapons';
|
||||
import type { StrongholdId } from './stronghold-cards';
|
||||
|
||||
/** Carthag adds a Snooper property, not a second physical card or Chemistry. */
|
||||
@@ -12,6 +13,7 @@ export function strongholdSnooper(
|
||||
effect: StrongholdId | null | undefined,
|
||||
weapon?: Card,
|
||||
defense?: Card,
|
||||
effectiveKind?: EffectiveWeapon['kind'],
|
||||
) {
|
||||
return (
|
||||
effect === 'carthag' &&
|
||||
@@ -19,7 +21,8 @@ export function strongholdSnooper(
|
||||
defense.kind !== 'worthless' &&
|
||||
isDefenseCard(defense) &&
|
||||
!defenseTypes(defense).includes('snooper') &&
|
||||
!weaponTypes(weapon).includes('poison')
|
||||
!(effectiveKind === undefined ? weaponTypes(weapon).includes('poison') :
|
||||
['poison', 'poisonBlade', 'poisonTooth', 'chemistry'].includes(effectiveKind ?? ''))
|
||||
);
|
||||
}
|
||||
export function strongholdBattleEffects(
|
||||
@@ -32,8 +35,12 @@ export function strongholdBattleEffects(
|
||||
aEffect?: StrongholdId | null,
|
||||
dEffect?: StrongholdId | null,
|
||||
) {
|
||||
return battleCardEffects(aw, ad, dw, dd, toothA, toothD, {
|
||||
attacker: strongholdSnooper(aEffect, aw, ad),
|
||||
defender: strongholdSnooper(dEffect, dw, dd),
|
||||
const weapons = resolveBattleWeapons({
|
||||
attacker: { weapon: aw, defense: ad },
|
||||
defender: { weapon: dw, defense: dd },
|
||||
});
|
||||
return battleCardEffects(aw, ad, dw, dd, toothA, toothD, {
|
||||
attacker: strongholdSnooper(aEffect, aw, ad, weapons.attacker.kind),
|
||||
defender: strongholdSnooper(dEffect, dw, dd, weapons.defender.kind),
|
||||
}, weapons);
|
||||
}
|
||||
Reference in new issue
Block a user