Skip to content

Commit

Permalink
OTJ update (#55)
Browse files Browse the repository at this point in the history
* Override Kor Haven mana values

Closes mtgoncurve/mtgoncurve.com#78

* OTJ update
  • Loading branch information
jshrake authored Apr 13, 2024
1 parent 189f5c6 commit 98a60a5
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified data/all_cards.landlord
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "landlord"
version = "2024.2.0"
version = "2024.4.0"
authors = ["Justin Shrake <justinshrake@gmail.com>"]
description = "Magic: The Gathering card draw and mulligan simulator"
repository = "https://github.com/mtgoncurve/landlord"
Expand Down
43 changes: 43 additions & 0 deletions lib/src/card/card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1086,4 +1086,47 @@ mod tests {
assert_eq!(card.is_land(), false);
assert_eq!(card.kind, CardKind::Unknown);
}

#[test]
fn kor_haven() {
let card = card!("Kor Haven");
assert_eq!(card.is_land(), true);
assert_eq!(card.mana_cost.c, 1);
}

#[test]
fn otj_card_0() {
let card = card!("Three Steps Ahead");
assert_eq!(card.is_land(), false);
}

#[test]
fn otj_card_1() {
let card = card!("Gisa, the Hellraiser");
assert_eq!(card.is_land(), false);
}

#[test]
fn otj_card_2() {
let card = card!("Abraded Bluffs");
assert_eq!(card.is_land(), true);
assert_eq!(card.mana_cost.r, 1);
assert_eq!(card.mana_cost.g, 0);
assert_eq!(card.mana_cost.b, 0);
assert_eq!(card.mana_cost.u, 0);
assert_eq!(card.mana_cost.w, 1);
assert_eq!(card.mana_cost.c, 0);
}

#[test]
fn otj_card_3() {
let card = card!("Conduit Pylons");
assert_eq!(card.is_land(), true);
assert_eq!(card.mana_cost.r, 1);
assert_eq!(card.mana_cost.g, 1);
assert_eq!(card.mana_cost.b, 1);
assert_eq!(card.mana_cost.u, 1);
assert_eq!(card.mana_cost.w, 1);
assert_eq!(card.mana_cost.c, 1);
}
}
7 changes: 6 additions & 1 deletion lib/src/scryfall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,12 @@ lazy_static! {
(
"Lavaglide Pathway",
ManaCost::from_rgbuwc(1, 0, 0, 0, 0, 0)
)
),
// https://github.com/mtgoncurve/mtgoncurve.com/issues/78
(
"Kor Haven",
ManaCost::from_rgbuwc(0, 0, 0, 0, 0, 1)
)
]
.iter()
.copied()
Expand Down

0 comments on commit 98a60a5

Please sign in to comment.