//! Engine core: generic rules machinery. Never name a specific card here. //! //! Module 1: every card in the game is an entity addressed by an id handle. //! The engine knows which zone each entity is in, who owns it, and when it //! entered play. //! //! Module 2: heroes, Health, Attack and Armor; triggered abilities; and the //! action queue that resolves a Sequence depth-first, recording an event log. //! //! Module 3: deferred death. Damage and destroy effects only mark minions; the //! Death Creation Step removes them when the outermost Phase ends, and Death //! Phases resolve their Deathrattles until no new deaths occur. //! //! Module 4: auras as card data, Aura Updates at defined points, and one //! routine that decides how many times a queued trigger activates. Playing a //! minion from hand, and Battlecries. //! //! Module 5: behaviour as data. Cards are definitions in the course's card format, //! loaded from JSON; one interpreter turns their effects into actions. Assemble //! builds a new card by swapping half of one card's text for half of another's. //! //! Part II lives in `puzzle`: a second engine, for the rule-writing puzzle game, //! beside the first. //! Module 6: the grid, the lexer and the parser. //! Module 7: `IS NOT`, and the resolution pass that turns parsed rules into rules in force. mod assemble; mod aura; mod card; mod death; mod effect; mod event; pub mod puzzle; mod queue; mod world; pub use assemble::{assemble, register_assembled, AssembleError, Half}; pub use card::{ Aura, Card, CardDef, CardLibrary, CardType, Clause, Effect, PoolFilter, Stacking, Target, Trigger, TriggerOn, }; pub use event::Event; pub use queue::{run_sequence, summon, Action, Ctx}; pub use world::{Chooser, EntityId, PlayerId, World, Zone, HERO_HEALTH};