refactor: reorg
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import {CombatEntity, EffectTable} from "./types";
|
||||
import {EffectData} from "@/samples/slay-the-spire-like/system/types";
|
||||
import {PlayerEntity} from "@/samples/slay-the-spire-like/system/combat/types";
|
||||
import {CombatState} from "./types";
|
||||
|
||||
export function addEffect(effects: EffectTable, effect: EffectData, stacks: number){
|
||||
let current = effects[effect.id];
|
||||
@@ -43,7 +44,10 @@ export function onPlayerItemEffectUpkeep(entity: PlayerEntity){
|
||||
}
|
||||
}
|
||||
|
||||
// TODO
|
||||
export function onDraw(entity: PlayerEntity, cardId:string ){}
|
||||
// TODO
|
||||
export function onDiscard(entity: PlayerEntity, cardId: string){}
|
||||
export function* getAliveEnemies(state: CombatState) {
|
||||
for (let enemy of state.enemies) {
|
||||
if (enemy.isAlive) {
|
||||
yield enemy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user