Connect Advanced Ecaz and Moritani special Karama first versions
This commit is contained in:
1 parent
59a406830c
commit
d438d923a3
17 files changed
+872
-3
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import {
|
||||
validateMoritaniSpecialKaramaChoice,
|
||||
type MoritaniSpecialKaramaAction,
|
||||
type MoritaniSpecialKaramaQuote,
|
||||
} from './moritani-special-karama';
|
||||
|
||||
/**
|
||||
* Public-quote-only first version: deny useful played weapons/defenses. Null
|
||||
* means decline; the engine supplies its own opportunity-specific action.
|
||||
* No opposing hand, hidden plans or speculative future battle are consulted.
|
||||
*/
|
||||
export function moritaniSpecialKaramaBotAction(
|
||||
quote: MoritaniSpecialKaramaQuote,
|
||||
): MoritaniSpecialKaramaAction | null {
|
||||
const karama = quote.karamas[0];
|
||||
if (!karama) return null;
|
||||
const discard = quote.playedCards.filter(card =>
|
||||
quote.keepableIds.includes(card.id) && [
|
||||
'projectile', 'poison', 'lasgun', 'shield', 'snooper', 'poisonBlade',
|
||||
'shieldSnooper', 'weirdingWay', 'chemistry', 'poisonTooth', 'artillery',
|
||||
].includes(card.kind),
|
||||
).map(card => card.id);
|
||||
// Cards already destined for compulsory disposal give no benefit for the cost.
|
||||
if (!discard.length) return null;
|
||||
const action: MoritaniSpecialKaramaAction = {
|
||||
type: 'card',
|
||||
mode: 'special',
|
||||
card: karama.id,
|
||||
event: quote.source.event,
|
||||
keep: [],
|
||||
discard,
|
||||
};
|
||||
validateMoritaniSpecialKaramaChoice(quote, quote.source, quote.source.owner, action);
|
||||
return action;
|
||||
}
|
||||
Reference in new issue
Block a user