205 lines
25 KiB
Python
205 lines
25 KiB
Python
import json
|
||
from pathlib import Path
|
||
|
||
OUT = Path('/home/prime/.openclaw/workspace/cardgen/eclipse_frontier_card_plan.json')
|
||
ISSUE = Path('/home/prime/.openclaw/workspace/cardgen/eclipse_frontier_issue_log.md')
|
||
|
||
|
||
def count(n=1, all=False, upto=False):
|
||
d = {'N': n}
|
||
if all: d = {'All': True}
|
||
if upto: d = {'N': n, 'UpTo': True}
|
||
return d
|
||
|
||
def target(type_, ownership, scope='Battlefield', n=1, all=False, filters=None):
|
||
t = {'Type': type_, 'Count': count(n=n, all=all), 'Scope': scope, 'Ownership': ownership}
|
||
if filters:
|
||
t['Filters'] = filters
|
||
return t
|
||
|
||
def fixed(n): return {'Fixed': n}
|
||
|
||
def dur(type_, n=None):
|
||
d = {'Type': type_}
|
||
if n is not None: d['N'] = n
|
||
return d
|
||
|
||
def eff_modify(stat, amt, stat_target=None):
|
||
e = {'$type': f'Modify{stat}', 'Amount': fixed(amt)}
|
||
if stat_target: e['StatTarget'] = stat_target
|
||
return e
|
||
|
||
def eff_set(flag, value): return {'$type': f'Set{flag}', 'Value': value}
|
||
def eff_push_aff(aff): return {'$type': 'PushAffinity', 'Affinity': {'Fixed': aff}}
|
||
def eff_push_final(aff): return {'$type': 'PushFinalAffinity', 'Affinity': {'Fixed': aff}}
|
||
def cond_on_aff(aff, subject='Target'): return {'$type': 'IsOnTileWithAffinity', 'Subject': subject, 'Affinity': aff}
|
||
def trig(type_, **kwargs):
|
||
d = {'$type': type_}
|
||
d.update(kwargs)
|
||
return d
|
||
|
||
def ability(name, type_, desc, actions, **kwargs):
|
||
d = {'Name': name, 'Type': type_, 'Actions': actions, 'Description': desc}
|
||
d.update(kwargs)
|
||
return d
|
||
|
||
def action(target_, effects, conditions=None, duration=None):
|
||
d = {'Target': target_, 'Effects': effects}
|
||
if conditions: d['Conditions'] = conditions
|
||
if duration: d['Duration'] = duration
|
||
return d
|
||
|
||
def unit(name, description, affinity, sp, st, hp, df, dmg, move_type, mp, min_atk, max_atk, genus, rarity, abilities, card_type='Spirit', tier=None, prev=None, requires_los=False, min_channel=None, max_channel=None):
|
||
attack_type = 'Ranged' if max_atk > 1 else 'Melee'
|
||
card = {
|
||
'name': name, 'description': description, 'cardType': card_type, 'affinity': affinity,
|
||
'spCost': sp, 'stCost': st, 'maxHealth': hp, 'maxDefense': df, 'damage': dmg,
|
||
'movementType': move_type, 'movementPoints': mp, 'minAttackRange': min_atk, 'maxAttackRange': max_atk,
|
||
'attackType': attack_type, 'requiresLos': requires_los,
|
||
'canAttack': True, 'canDefend': True, 'canBeAttacked': True, 'canBeBlocked': True,
|
||
'canMove': True, 'canBeObstructed': True, 'canUseAbility': True, 'canBeSacrificed': card_type == 'Spirit',
|
||
'genus': genus, 'rarity': rarity, 'abilitiesJson': abilities,
|
||
}
|
||
if min_channel is not None: card['minChannelRange'] = min_channel
|
||
if max_channel is not None: card['maxChannelRange'] = max_channel
|
||
if tier is not None: card['tier'] = tier
|
||
if prev is not None: card['previousTierName'] = prev
|
||
return card
|
||
|
||
def spell(name, description, affinity, sp, rarity, effects, card_type):
|
||
return {'name': name, 'description': description, 'cardType': card_type, 'affinity': affinity, 'spCost': sp, 'stCost': 0, 'rarity': rarity, 'effectsJson': effects}
|
||
|
||
def terr(name, description, affinity, mode, sp, rarity, effects):
|
||
return {'name': name, 'description': description, 'cardType': 'Terramorpha', 'affinity': affinity, 'spCost': sp, 'stCost': 0, 'terramorphaMode': mode, 'rarity': rarity, 'effectsJson': effects}
|
||
|
||
cards = []
|
||
|
||
# ArchSpirit line
|
||
cards += [
|
||
unit('Serai of the Witness Paths', 'A fox-masked diplomat in layered legal silks stands beneath a cliffside gate grown into the roots of colossal alien trees. Signal ribbons, carved oath-stones, and brass witness chimes sway around her in high jungle wind. One hand touches a luminous boundary-marker sunk into living earth; the other extends in invitation and warning.', 'Fort', 0, 0, 8, 2, 1, 'Walk', 2, 1, 1, ['Kitsune','Sasquatch','Leader'], 'Rare', [
|
||
ability('Sanctuary Is a Promise — Hill', 'Passive', 'Friendly units on Hill gain +1 Defense.', [action(target('Unit','Owner',all=True), [eff_modify('Defense',1,'Max')], [cond_on_aff('Hill')])]),
|
||
ability('Sanctuary Is a Promise — Forest', 'Passive', 'Friendly units on Forest gain +1 Defense.', [action(target('Unit','Owner',all=True), [eff_modify('Defense',1,'Max')], [cond_on_aff('Forest')])]),
|
||
ability('Sanctuary Is a Promise — Fort', 'Passive', 'Friendly units on Fort gain +1 Defense.', [action(target('Unit','Owner',all=True), [eff_modify('Defense',1,'Max')], [cond_on_aff('Fort')])]),
|
||
ability('Witness Entry', 'Triggered', 'When a friendly Spirit enters the battlefield on Fort, gain 1 SP.', [action(target('Player','Owner',scope='Player'), [{'$type':'ModifySP','Amount':fixed(1)}])], TriggerEvent=trig('OnUnitEnterBattlefield', UnitType='Spirit', Ownership='Owner'), ActivationConditions=[cond_on_aff('Fort')])
|
||
], card_type='ArchSpirit', tier=1, min_channel=1, max_channel=3),
|
||
unit('Serai, Covenant of Stone and Root', 'Serai stands atop a fortified ridge where precursor stone arches and jungle rootwork have fused into one living tribunal. Behind her, Hippogriff banners snap in the wind while witness tablets orbit in slow light. The whole scene feels like a court that learned how to survive a siege.', 'Fort', 4, 0, 10, 3, 2, 'Walk', 2, 1, 2, ['Kitsune','Sasquatch','Leader'], 'Epic', [
|
||
ability('Boundaries with Teeth', 'Passive', 'Friendly Spirits on Fort gain +1 Damage and cannot be blocked.', [action(target('Spirit','Owner',all=True), [eff_modify('Damage',1), eff_set('CanBeBlocked', False)], [cond_on_aff('Fort')])]),
|
||
ability('Legal Interdiction', 'Active', 'Target enemy loses CanMove until end of turn. If it is on Fort, it also loses CanAttack until end of turn.', [
|
||
action(target('Unit','Enemy'), [eff_set('CanMove', False)], duration=dur('UntilEndOfTurn')),
|
||
action(target('Unit','Target'), [eff_set('CanAttack', False)], conditions=[cond_on_aff('Fort')], duration=dur('UntilEndOfTurn'))
|
||
], Cost=[{'Type':'SpiritPoints','Amount':2}], Range={'Min':1,'Max':4}, UsesPerTurn=1),
|
||
ability('Tested Claim', 'Triggered', 'When an enemy enters this aura range, deal 1 damage to it unless it is on Fort.', [action(target('Unit','Target'), [{'$type':'DealDamage','Amount':fixed(1),'BypassDefense':False}], conditions=[{'$type':'Or','Conditions':[cond_on_aff(a) for a in ['Hill','Forest','Lake','Marsh','Plains','Steppe','Swamp','Grove','Mountain','Ocean','Island','Jungle']]}])], AuraRange={'Min':1,'Max':2}, TriggerEvent=trig('OnEnterAuraRange', AuraOwnership='Owner', UnitOwnership='Enemy'))
|
||
], card_type='ArchSpirit', tier=2, prev='Serai of the Witness Paths', min_channel=1, max_channel=4),
|
||
unit('Serai, Living Charter of Ilyra', 'Fully ascended, Serai appears as the personification of sanctuary law itself: nine spectral tails woven from root-light and brass script, standing upon a high citadel grown from cliffstone, jungle heartwood, and precursor machinery. Around her, the air is full of signed witness-forms, migrating lanterns, and the silhouettes of refugees crossing defended bridges.', 'Fort', 7, 1, 12, 4, 3, 'Walk', 2, 1, 2, ['Kitsune','Sasquatch','Leader'], 'Legendary', [
|
||
ability('Refuge Cannot Be Taken, Only Kept — Stats', 'Passive', 'Friendly units on Hill, Forest, or Fort gain +1/+1.', [
|
||
action(target('Unit','Owner',all=True), [eff_modify('Damage',1), eff_modify('Health',1,'Max')], [cond_on_aff('Hill')]),
|
||
action(target('Unit','Owner',all=True), [eff_modify('Damage',1), eff_modify('Health',1,'Max')], [cond_on_aff('Forest')]),
|
||
action(target('Unit','Owner',all=True), [eff_modify('Damage',1), eff_modify('Health',1,'Max')], [cond_on_aff('Fort')]),
|
||
]),
|
||
ability('Refuge Cannot Be Taken, Only Kept — Fort Passage', 'Passive', 'Friendly units on Fort cannot be obstructed.', [action(target('Unit','Owner',all=True), [eff_set('CanBeObstructed', False)], [cond_on_aff('Fort')])]),
|
||
ability('Rewrite the Boundary', 'Active', 'Target tile becomes Fort. Then target friendly unit gains +1 MP this turn.', [
|
||
action(target('Tile','Any'), [eff_push_final('Fort')]),
|
||
action(target('Unit','Owner'), [eff_modify('MP',1,'Current')], duration=dur('UntilEndOfTurn'))
|
||
], Cost=[{'Type':'SpiritPoints','Amount':3}], Range={'Min':1,'Max':5}, UsesPerTurn=1)
|
||
], card_type='ArchSpirit', tier=3, prev='Serai, Covenant of Stone and Root', min_channel=1, max_channel=5),
|
||
]
|
||
|
||
# Terramorpha
|
||
cards += [
|
||
terr('Verdant Bastion Monomorpha', 'A pulse of green root-light surges through broken masonry, causing vines and carved stone to fuse into a defensible living wall.', 'Forest', 'Mono', 2, 'Common', [action(target('Tile','Any'), [eff_push_aff('Forest')])]),
|
||
terr('Escarpment Bastion Dimorpha', 'Two linked ridge-lines of ochre stone erupt from the ground like sleeping battlements remembering their shape.', 'Hill', 'Di', 3, 'Uncommon', [action(target('Tile','Any', n=2), [eff_push_aff('Hill')])]),
|
||
terr('Witness Rampart Trimorpha', 'A three-point line of living roots, stone buttresses, and glowing legal sigils races across the battlefield, drawing a sanctuary border in real time.', 'Forest', 'Tri', 4, 'Rare', [action(target('Tile','Any', n=3), [eff_push_aff('Forest')])]),
|
||
]
|
||
|
||
# Spirits
|
||
cards += [
|
||
unit('Root-Bridge Pathfinder','A furred route-guide moves across woven branch bridges over an abyss of glowing spores and machine roots.','Forest',1,0,2,0,1,'Walk',3,1,1,['Sasquatch','Scout'],'Common',[
|
||
ability('Root-Bridge Toll','Triggered','When this moves onto Fort, gain 1 SP.', [action(target('Player','Owner',scope='Player'), [{'$type':'ModifySP','Amount':fixed(1)}])], TriggerEvent=trig('OnUnitMove', Ownership='ExactSelf'), ActivationConditions=[cond_on_aff('Fort','Self')])
|
||
]),
|
||
unit('Cliffline Warrant Scribe','A masked legal clerk carves glowing boundary clauses into standing stones at the edge of a wind-beaten shelf.','Hill',1,0,1,1,1,'Walk',2,1,1,['Kitsune','Jurist'],'Common',[
|
||
ability('Warrant Cover','OnChanneled'.replace('OnChanneled','Triggered'),'On channel, a friendly unit gains +1 Defense until end of turn.', [action(target('Unit','Owner'), [eff_modify('Defense',1,'Current')], duration=dur('UntilEndOfTurn'))], TriggerEvent=trig('OnChanneled', CardType='Spirit', Ownership='Owner', Filter={'$type':'IsSelf'}))
|
||
]),
|
||
unit('Eyrie Debt Courier','A messenger-rider sweeps between cliff beacons carrying treaty tubes and storm-marked debt seals.','Hill',2,0,2,1,1,'Flight',3,1,1,['Hippogriff','Courier'],'Common',[
|
||
ability('Forwarded Route','Triggered','When this enters, another friendly unit gains +1 MP this turn.', [action(target('Unit','Owner'), [eff_modify('MP',1,'Current')], duration=dur('UntilEndOfTurn'))], TriggerEvent=trig('OnUnitEnterBattlefield', UnitType='Unit', Ownership='Owner', Filter={'$type':'IsSelf'}))
|
||
]),
|
||
unit('Canopy Oathkeeper','A massive guardian leans on a root-grown halberd beneath luminescent leaves and old warning charms.','Forest',2,0,2,2,1,'Walk',2,1,1,['Sasquatch','Warden'],'Uncommon',[
|
||
ability('Oathkeeper Aura','Aura','Aura 1: friendly units gain +1 Defense.', [action(target('Unit','Owner',all=True), [eff_modify('Defense',1,'Max')])], AuraRange={'Min':1,'Max':1})
|
||
]),
|
||
unit('Fortline Mediator','A silver-tongued envoy walks a parapet grown out of cliff roots, foxfire lanterns floating in her wake.','Fort',2,0,2,1,2,'Walk',2,1,1,['Kitsune','Diplomat'],'Uncommon',[
|
||
ability('Fortline Briefing','Triggered','When this enters on Fort, draw 1 then discard 1.', [action(target('Player','Owner',scope='Player'), [{'$type':'DrawCards','N':1,'Player':'Owner'},{'$type':'DiscardCards','N':1,'Player':'Owner'}])], TriggerEvent=trig('OnUnitEnterBattlefield', UnitType='Unit', Ownership='Owner', Filter={'$type':'IsSelf'}), ActivationConditions=[cond_on_aff('Fort')])
|
||
]),
|
||
unit('Storm-Pledge Lancer','An armored sky-lancer dives through ozone haze with a rune-lance leveled toward a contested tower gate.','Hill',3,0,3,1,2,'Flight',3,1,1,['Hippogriff','Soldier'],'Uncommon',[
|
||
ability('Fort Dive','Triggered','When this attacks while on Fort, it gains +1 Damage until end of turn.', [action(target('Unit','ExactSelf'), [eff_modify('Damage',1)], duration=dur('UntilEndOfTurn'))], TriggerEvent=trig('OnUnitAttack', Ownership='Owner', Filter={'$type':'IsSelf'}), ActivationConditions=[cond_on_aff('Fort','Self')])
|
||
]),
|
||
unit('Memory-Root Bailiff','A broad, solemn arbiter listens with one ear to living roots and with the other to frightened settlers.','Forest',3,0,3,2,1,'Walk',2,1,2,['Sasquatch','Jurist'],'Uncommon',[
|
||
ability('Silence for the Record','Active','Target enemy loses CanAttack until end of turn.', [action(target('Unit','Enemy'), [eff_set('CanAttack',False)], duration=dur('UntilEndOfTurn'))], Range={'Min':1,'Max':2}, UsesPerTurn=1)
|
||
]),
|
||
unit('Bastion Verge Ranger','A ridge-runner in barkplate crosses a fortified ravine on rope and root, always one step ahead of the map.','Fort',3,0,3,2,2,'Walk',3,1,1,['Sasquatch','Scout'],'Uncommon',[
|
||
ability('Verge Momentum','Triggered','When this moves onto Fort, it gains +1 MP this turn.', [action(target('Unit','ExactSelf'), [eff_modify('MP',1,'Current')], duration=dur('UntilEndOfTurn'))], TriggerEvent=trig('OnUnitMove', Ownership='ExactSelf'), ActivationConditions=[cond_on_aff('Fort','Self')])
|
||
]),
|
||
unit('Glassfire Deceiver-Advocate','A fox envoy in mirrored lacquer and mourning silk stands inside a courtroom made of rain, reflection, and brass.','Fort',3,0,2,1,2,'Walk',2,1,2,['Kitsune','Diplomat'],'Rare',[
|
||
ability('Glassfire Exposure','Triggered','On channel, target enemy loses CanUseAbility until end of turn.', [action(target('Unit','Enemy'), [eff_set('CanUseAbility',False)], duration=dur('UntilEndOfTurn'))], TriggerEvent=trig('OnChanneled', CardType='Spirit', Ownership='Owner', Filter={'$type':'IsSelf'}))
|
||
]),
|
||
unit('Stormtusk Claim-Breaker','A lean drake with conductive tusks smashes a relay tower while lightning crawls across its plated flanks.','Hill',4,0,4,2,3,'Walk',2,1,1,['Astral Drake stormtusk'],'Rare',[
|
||
ability('Claim-Breaking Charge','Triggered','On attack, push target 1 tile.', [action(target('Unit','Enemy'), [{'$type':'PushUnit','Tiles':1}])], TriggerEvent=trig('OnUnitAttack', Ownership='Owner', Filter={'$type':'IsSelf'}))
|
||
]),
|
||
unit('Shrine-Canopy Witness','A many-headed singer coils through shrine vines, each mouth carrying a different fragment of binding law.','Forest',4,0,4,2,2,'Walk',2,1,2,['Astral Hydra Singer'],'Rare',[
|
||
ability('Witnessed Approach','Triggered','When a friendly unit enters this aura range, that unit gains +1 Defense until end of turn.', [action(target('Unit','Target'), [eff_modify('Defense',1,'Current')], duration=dur('UntilEndOfTurn'))], AuraRange={'Min':1,'Max':2}, TriggerEvent=trig('OnEnterAuraRange', AuraOwnership='Owner', UnitOwnership='Owner'))
|
||
]),
|
||
unit('Mnemosyne Leak-Slime','A translucent remediation pour crawls across archive brass and tree roots, carrying broken memory crystals in its body like stars in gel.','Forest',4,0,4,1,2,'Walk',2,1,1,['Sentient Slime'],'Rare',[
|
||
ability('Archive Siphon','Triggered','On enter on Fort, draw 2 then discard 1.', [action(target('Player','Owner',scope='Player'), [{'$type':'DrawCards','N':2,'Player':'Owner'},{'$type':'DiscardCards','N':1,'Player':'Owner'}])], TriggerEvent=trig('OnUnitEnterBattlefield', UnitType='Unit', Ownership='Owner', Filter={'$type':'IsSelf'}), ActivationConditions=[cond_on_aff('Fort')])
|
||
]),
|
||
unit('Sky-Law Manta','A luminous manta glides above cliff beacons and portal weather, carrying witness-banners between impossible thermal lanes.','Hill',5,0,4,2,3,'Flight',3,2,3,['Nebula Manta'],'Rare',[
|
||
ability('High Sanctuary Draft','Aura','Friendly Fort units in aura range cannot be obstructed.', [action(target('Unit','Owner',all=True), [eff_set('CanBeObstructed',False)], [cond_on_aff('Fort')])], AuraRange={'Min':1,'Max':2})
|
||
], requires_los=True),
|
||
unit('Sunken Tribunal Raykeeper','A tide-priest in reflective armor lifts a relic witness-bowl toward a sun seen only through floodwater.','Fort',5,0,5,2,2,'Walk',2,1,2,['Astral Kraken of the Sun','Jurist'],'Epic',[
|
||
ability('Tribunal Freeze','Active','Target enemy on Fort loses CanMove and CanAttack until end of turn.', [action(target('Unit','Enemy'), [eff_set('CanMove',False), eff_set('CanAttack',False)], conditions=[cond_on_aff('Fort')], duration=dur('UntilEndOfTurn'))], Range={'Min':1,'Max':2}, UsesPerTurn=1)
|
||
]),
|
||
unit('Tusk-Lord of the Audit Storm','A tusk-lord roars atop an electrified mesa while the sky itself seems to judge the city below.','Hill',6,1,6,2,4,'Walk',2,1,1,['Astral Drake stormtusk','Mythic'],'Legendary',[
|
||
ability('Audit Storm','Triggered','When this attacks a unit, that unit loses CanMove until end of turn.', [action(target('Unit','Enemy'), [eff_set('CanMove',False)], duration=dur('UntilEndOfTurn'))], TriggerEvent=trig('OnUnitAttack', Ownership='Owner', Filter={'$type':'IsSelf'}))
|
||
]),
|
||
unit('Polyphonic Sanctuary Hydra','A colossal choir-brood coils across walls and trees at once, its harmonies turning the battlefield into a legal chorus.','Fort',7,1,7,3,3,'Walk',2,1,2,['Astral Hydra Singer','Mythic'],'Legendary',[
|
||
ability('Polyphonic Sanctuary','Passive','Friendly Fort units gain +1/+1.', [action(target('Unit','Owner',all=True), [eff_modify('Damage',1), eff_modify('Health',1,'Max')], [cond_on_aff('Fort')])]),
|
||
ability('First Chorus','Triggered','When a friendly unit enters this aura range, draw 1 card.', [action(target('Player','Owner',scope='Player'), [{'$type':'DrawCards','N':1,'Player':'Owner'}])], AuraRange={'Min':1,'Max':2}, TriggerEvent=trig('OnEnterAuraRange', AuraOwnership='Owner', UnitOwnership='Owner'))
|
||
]),
|
||
]
|
||
|
||
# Repentance
|
||
cards += [
|
||
spell('Boundary Injunction','A glowing legal boundary slams down across contested ground, its script anchored in root and stone.','Fort',1,'Common',[action(target('Unit','Owner'), [eff_set('CanBeAttacked',False)], duration=dur('UntilEndOfTurn'))],'Repentance'),
|
||
spell('Upland Evacuation Route','Beacon towers light in sequence along a cliff road as refugees sprint between switchback shadows.','Hill',2,'Common',[action(target('Unit','Owner'), [eff_modify('MP',2,'Current')], duration=dur('UntilEndOfTurn'))],'Repentance'),
|
||
spell('Root-Memory Appeal','Vines peel back from old stone to reveal witness-faces and forgotten names in sap-light.','Forest',2,'Uncommon',[action(target('Player','Owner',scope='Player'), [{'$type':'DrawCards','N':2,'Player':'Owner'},{'$type':'DiscardCards','N':1,'Player':'Owner'}])],'Repentance'),
|
||
spell('Raise the Sanctuary Wall','Jungle roots and uplifted stone interlock into a living barricade etched with glowing refugee marks.','Fort',3,'Uncommon',[
|
||
action(target('Tile','Any'), [eff_push_final('Fort')]),
|
||
action(target('Unit','Owner'), [eff_modify('Defense',1,'Current')], duration=dur('UntilEndOfTurn'))
|
||
],'Repentance'),
|
||
spell('Charter of Shared Refuge','A many-signatory covenant unfurls over the battlefield while every faction’s seal burns in equal light.','Fort',4,'Rare',[
|
||
action(target('Unit','Owner',all=True), [eff_modify('Damage',1), eff_modify('Defense',1,'Current'), eff_set('CanUseAbility',True)], conditions=[cond_on_aff('Fort')], duration=dur('UntilEndOfTurn'))
|
||
],'Repentance'),
|
||
]
|
||
|
||
# Ruin
|
||
cards += [
|
||
{
|
||
'name':'Witness Stone of Ashen Mere','description':'A weathered monolith at the truce-crossing of Ashen Mere, carved with names of those who were allowed through and those who were not.','cardType':'Ruin','affinity':'Fort','spCost':3,'stCost':0,'rarity':'Rare','abilitiesJson':[
|
||
ability('Ashen Ledger Grant','Triggered','If this Ruin is occupied by a friendly unit when it activates, gain 1 SP.', [action(target('Player','Owner',scope='Player'), [{'$type':'ModifySP','Amount':fixed(1)}])], TriggerEvent=trig('OnRuinActivation', RuinOwnership='Owner', OccupantOwnership='Owner')),
|
||
ability('Ashen Ledger Sorting','Triggered','If this Ruin is occupied by a friendly unit when it activates, draw 1 then discard 1.', [action(target('Player','Owner',scope='Player'), [{'$type':'DrawCards','N':1,'Player':'Owner'},{'$type':'DiscardCards','N':1,'Player':'Owner'}])], TriggerEvent=trig('OnRuinActivation', RuinOwnership='Owner', OccupantOwnership='Owner')),
|
||
ability('Ashen Ledger Injunction','Triggered','If this Ruin is occupied by a friendly unit when it activates, target enemy in aura range loses CanAttack until end of turn.', [action(target('Unit','Enemy', filters=[{'$type':'WithinRange','Min':1,'Max':2}]), [eff_set('CanAttack',False)], duration=dur('UntilEndOfTurn'))], TriggerEvent=trig('OnRuinActivation', RuinOwnership='Owner', OccupantOwnership='Owner')),
|
||
]
|
||
}
|
||
]
|
||
|
||
# Instinct
|
||
cards += [
|
||
spell('Objection Under Witness','A legal cry rings out across a battlefield tribunal and an attack stalls mid-motion as if the world itself is listening.','Fort',1,'Common',[action(target('Unit','Any'), [eff_set('CanAttack',False)], duration={'Type':'UntilEndOfSequence'})],'Instinct'),
|
||
spell('Canopy Ambuscade Clause','Jungle shadows fold around an advancing enemy as root-signs flare with old territorial law.','Forest',2,'Common',[action(target('Unit','Any'), [{'$type':'PushUnit','Tiles':1}])],'Instinct'),
|
||
spell('Highwind Extraction','Hippogriff lines dive through stormlight to snatch the vulnerable out of a collapsing lane.','Hill',2,'Common',[action(target('Unit','Owner'), [eff_set('CanBeAttacked',False)], duration=dur('UntilEndOfTurn'))],'Instinct'),
|
||
spell('Unwritten Path','The jungle quietly edits the route beneath an enemy’s feet until they are suddenly somewhere much less useful.','Forest',3,'Uncommon',[action(target('Unit','Any'), [eff_set('CanMove',False)], duration=dur('UntilEndOfTurn'))],'Instinct'),
|
||
]
|
||
|
||
OUT.write_text(json.dumps(cards, indent=2))
|
||
ISSUE.write_text('''# Eclipse Frontier — Live Catalog Issue Log\n\nDeck: **Lattice Witness Compact**\nPlan file: `cardgen/eclipse_frontier_card_plan.json`\n\n## Summary\n- Goal: implement as much of Eclipse Frontier cleanly in the current live SOR catalog as possible.\n- Result of authoring pass: **30 catalog definitions prepared**.\n- Deferred / omitted from live pass: **3 cards** due current engine gaps or poor-fit templating.\n\n## Global choices\n- Used **depiction text** in top-level card descriptions and **mechanical text** inside ability descriptions, matching the runbook.\n- Chose **engine-safe wording** over original poetic/modal wording when exact execution was not clean.\n- Assigned **best-fit provisional rarities** because deck docs do not specify live rarities.\n- Kept cards **outside a set / collector numbering** for now; this should be revisited once the set publishing pipeline is formalized.\n\n## Omitted for now\n- **Serai of the Witness Paths — Mark the Safe Route**: omitted. Needs tile-bound delayed marker memory plus first-friendly-entry consumption semantics.\n- **Serai, Living Charter of Ilyra — Witness-Covenant**: omitted. Needs pre-death replacement / prevention timing.\n- **Gate-Spire Intercessor**: omitted. Needs relational scan like “enemies adjacent to Fort units”.\n\n## Templating / compromise notes by card\n- **Serai, Covenant of Stone and Root / Boundaries with Teeth**: simplified to “on Fort gain +1 Damage and cannot be blocked” instead of the narrower “while moving” rider.\n- **Serai, Covenant of Stone and Root / Tested Claim**: implemented with an explicit positive affinity list as the current practical substitute for a missing NOT-on-Fort condition. Ugly, but deterministic.\n- **Serai, Living Charter of Ilyra / Rewrite the Boundary**: converted the move rider into `+1 MP this turn`.\n- **Eyrie Debt Courier**: converted “another friendly unit may move 1 tile” into `+1 MP this turn`.\n- **Storm-Pledge Lancer**: simplified to “when this attacks while on Fort”.\n- **Bastion Verge Ranger**: simplified extra move into `+1 MP this turn`.\n- **Glassfire Deceiver-Advocate**: locked the modal effect to `CanUseAbility = false`.\n- **Shrine-Canopy Witness**: locked the modal buff to `+1 Defense until end of turn`.\n- **Mnemosyne Leak-Slime**: locked to the Fort branch only: “on enter on Fort, draw 2 then discard 1.”\n- **Sunken Tribunal Raykeeper**: simplified from “on Fort or adjacent to Fort” to just “on Fort”.\n- **Tusk-Lord of the Audit Storm**: simplified from damage-source memory to attack-trigger memory.\n- **Polyphonic Sanctuary Hydra**: kept the draw trigger without a first-time-per-turn cap because that trigger limit is not presently available. This is intentionally logged as balance-risky.\n- **Upland Evacuation Route**: used `+2 MP this turn` instead of effect-move 1-2 tiles.\n- **Root-Memory Appeal**: locked to `Draw 2 then discard 1`.\n- **Canopy Ambuscade Clause**: used a plain 1-tile push.\n- **Highwind Extraction**: locked to temporary untargetability.\n- **Unwritten Path**: expressed as temporary `CanMove = false`.\n- **Witness Stone of Ashen Mere**: the enemy-lock rider uses a simple within-range filter rather than a true aura-specific ruin model; verify in live play.\n\n## Questions / follow-up\n- Confirm whether `UntilEndOfSequence` remains valid in the live engine for Instinct timing; existing live cards suggest yes.\n- Confirm whether current passive stat modifiers should prefer `MaxDefense` vs `CurrentDefense` in final content style; this pass used `Max` for stable board buffs and `Current` for temporary tactical shielding.\n- Revisit the Hydra draw trigger if it proves too snowbally without a per-turn cap.\n- Revisit set assignment / collector numbering / release-state metadata once the broader set pipeline is ready.\n''')
|
||
print(f'wrote {OUT}')
|
||
print(f'wrote {ISSUE}')
|
||
print('count', len(cards))
|