Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
{
"kind": "pump_all",
"affects": {
"scope": "creatures_you_control"
"card_type": "creature"
},
"power": 2,
"toughness": 2
Expand Down
8 changes: 4 additions & 4 deletions crates/sage-engine/data/catalog/angel_of_the_dawn.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
{
"kind": "pump_all",
"affects": {
"scope": "creatures_you_control"
},
"card_type": "creature"
},
"power": 1,
"toughness": 1
},
{
"kind": "grant_keyword_all",
"affects": {
"scope": "creatures_you_control"
},
"card_type": "creature"
},
"keyword": "vigilance"
}
]
Expand Down
9 changes: 7 additions & 2 deletions crates/sage-engine/data/catalog/cleansing_nova.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
{
"kind": "destroy_all",
"affects": {
"scope": "each_creature"
"scope": "any",
"card_type": "creature"
}
}
]
Expand All @@ -25,7 +26,11 @@
{
"kind": "destroy_all",
"affects": {
"scope": "each_artifact_or_enchantment"
"scope": "any",
"card_type": [
"artifact",
"enchantment"
]
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion crates/sage-engine/data/catalog/crash_through.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{
"kind": "grant_keyword_all",
"affects": {
"scope": "creatures_you_control"
"card_type": "creature"
},
"keyword": "trample"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
{
"kind": "pump_all",
"affects": {
"scope": "creatures_you_control",
"card_type": "creature",
"min_power": 4
},
"power": 1,
Expand All @@ -46,7 +46,7 @@
{
"kind": "grant_keyword_all",
"affects": {
"scope": "creatures_you_control",
"card_type": "creature",
"min_power": 4
},
"keyword": "trample"
Expand Down
4 changes: 2 additions & 2 deletions crates/sage-engine/data/catalog/heroic_reinforcements.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
{
"kind": "pump_all",
"affects": {
"scope": "creatures_you_control"
"card_type": "creature"
},
"power": 1,
"toughness": 1
},
{
"kind": "grant_keyword_all",
"affects": {
"scope": "creatures_you_control"
"card_type": "creature"
},
"keyword": "haste"
}
Expand Down
2 changes: 1 addition & 1 deletion crates/sage-engine/data/catalog/inspired_charge.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{
"kind": "pump_all",
"affects": {
"scope": "creatures_you_control"
"card_type": "creature"
},
"power": 2,
"toughness": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
{
"kind": "pump_all",
"affects": {
"scope": "creatures_you_control",
"card_type": "creature",
"subtype": "Dragon"
},
"power": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{
"kind": "grant_keyword_all",
"affects": {
"scope": "creatures_you_control",
"card_type": "creature",
"below_source_power": true
},
"keyword": "indestructible"
Expand Down
4 changes: 2 additions & 2 deletions crates/sage-engine/data/catalog/make_a_stand.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
{
"kind": "pump_all",
"affects": {
"scope": "creatures_you_control"
"card_type": "creature"
},
"power": 1,
"toughness": 0
},
{
"kind": "grant_keyword_all",
"affects": {
"scope": "creatures_you_control"
"card_type": "creature"
},
"keyword": "indestructible"
}
Expand Down
5 changes: 3 additions & 2 deletions crates/sage-engine/data/catalog/plague_mare.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
{
"kind": "pump_all",
"affects": {
"scope": "creatures_your_opponents_control"
},
"scope": "opponents_control",
"card_type": "creature"
},
"power": -1,
"toughness": -1
}
Expand Down
3 changes: 2 additions & 1 deletion crates/sage-engine/data/catalog/radiating_lightning.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
{
"kind": "deal_damage",
"affects": {
"scope": "creatures_that_player_controls"
"scope": "that_player",
"card_type": "creature"
},
"amount": 1
}
Expand Down
3 changes: 2 additions & 1 deletion crates/sage-engine/data/catalog/sarkhan_dragonsoul.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
{
"kind": "deal_damage",
"affects": {
"scope": "creatures_your_opponents_control"
"scope": "opponents_control",
"card_type": "creature"
},
"amount": 1
}
Expand Down
6 changes: 5 additions & 1 deletion crates/sage-engine/data/catalog/sarkhan_s_unsealing.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@
{
"kind": "deal_damage",
"affects": {
"scope": "creatures_and_planeswalkers_your_opponents_control"
"scope": "opponents_control",
"card_type": [
"creature",
"planeswalker"
]
},
"amount": 4
}
Expand Down
4 changes: 3 additions & 1 deletion crates/sage-engine/data/catalog/tectonic_rift.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
{
"kind": "restrict_all",
"affects": {
"scope": "creatures_without_flying"
"scope": "any",
"card_type": "creature",
"without_keyword": "flying"
},
"restriction": "cant_block"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
{
"kind": "restrict_all",
"affects": {
"scope": "creatures_you_control"
"card_type": "creature"
},
"restriction": "cant_be_blocked"
}
Expand Down
4 changes: 3 additions & 1 deletion crates/sage-engine/data/catalog/trumpet_blast.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
{
"kind": "pump_all",
"affects": {
"scope": "attacking_creatures"
"scope": "any",
"card_type": "creature",
"attacking": true
},
"power": 2,
"toughness": 0
Expand Down
3 changes: 2 additions & 1 deletion crates/sage-engine/data/catalog/uncomfortable_chill.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
{
"kind": "pump_all",
"affects": {
"scope": "creatures_your_opponents_control"
"scope": "opponents_control",
"card_type": "creature"
},
"power": -2,
"toughness": 0
Expand Down
2 changes: 1 addition & 1 deletion crates/sage-engine/data/catalog/valiant_knight.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
{
"kind": "grant_keyword_all",
"affects": {
"scope": "creatures_you_control",
"card_type": "creature",
"subtype": "Knight"
},
"keyword": "double_strike"
Expand Down
4 changes: 2 additions & 2 deletions crates/sage-engine/data/catalog/vivien_of_the_arkbow.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@
{
"kind": "pump_all",
"affects": {
"scope": "creatures_you_control"
"card_type": "creature"
},
"power": 4,
"toughness": 4
},
{
"kind": "grant_keyword_all",
"affects": {
"scope": "creatures_you_control"
"card_type": "creature"
},
"keyword": "trample"
}
Expand Down
2 changes: 2 additions & 0 deletions crates/sage-engine/src/ability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ use crate::token::TokenData;

mod cost;
mod effect;
mod filter;
mod selector;
mod static_ability;
mod target;
mod trigger;

pub use cost::*;
pub use effect::*;
pub use filter::*;
pub use selector::*;
pub use static_ability::*;
pub use target::*;
Expand Down
10 changes: 5 additions & 5 deletions crates/sage-engine/src/ability/effect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub enum Effect {
/// The subject is a [`PlayerRef`] exactly as [`Effect::Mill`]'s is, and decides on
/// its own whether a target is chosen: `target_player` fills a slot and can fizzle,
/// `each_opponent` fills none and cannot. It is deliberately **not** a
/// [`MassAffects`] class: every one of those is read relative to the effect's
/// [`PermanentFilter`] class: every one of those is read relative to the effect's
/// controller and none of them targets, so "creatures *that player* controls" is
/// unsayable in that vocabulary and sayable in this one without inventing anything.
///
Expand Down Expand Up @@ -174,7 +174,7 @@ pub enum Effect {
/// Indestructible and regeneration are unmodeled, so nothing survives this.
DestroyAll {
/// The class of permanents destroyed.
affects: DestroyAffects,
affects: PermanentFilter,
},
/// Exile the single permanent this effect targets (CR 406.2 / CR 701.19): it is
/// moved from the battlefield to its owner's exile zone through the one
Expand Down Expand Up @@ -472,7 +472,7 @@ pub enum Effect {
/// difference between a one-shot pump and an anthem.
PumpAll {
/// The class of permanents modified.
affects: MassAffects,
affects: PermanentFilter,
/// The signed amount added to each affected permanent's power.
power: i32,
/// The signed amount added to each affected permanent's toughness.
Expand All @@ -484,7 +484,7 @@ pub enum Effect {
/// affected set in on resolution exactly as [`Effect::PumpAll`] does.
GrantKeywordAll {
/// The class of permanents granted the keyword.
affects: MassAffects,
affects: PermanentFilter,
/// The keyword ability granted until end of turn.
keyword: Keyword,
},
Expand Down Expand Up @@ -532,7 +532,7 @@ pub enum Effect {
/// on resolution exactly as [`Effect::PumpAll`] does (CR 611.2c).
RestrictAll {
/// The class of permanents restricted.
affects: MassAffects,
affects: PermanentFilter,
/// The restriction imposed until end of turn.
restriction: CombatRestriction,
},
Expand Down
Loading
Loading