mirror of
https://github.com/Steffo99/patched-porobot.git
synced 2024-12-22 09:34:21 +00:00
Lazily update to game version 5.9.0
This commit is contained in:
parent
8ae11125ed
commit
cf4adc4024
6 changed files with 79 additions and 32 deletions
|
@ -118,8 +118,8 @@ mod tests {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
test_fetch!(test_fetch_4_9_0_en_us, "4_9_0", "en_us");
|
test_fetch!(test_fetch_5_9_0_en_us, "5_9_0", "en_us");
|
||||||
test_fetch!(test_fetch_4_9_0_it_it, "4_9_0", "it_it");
|
test_fetch!(test_fetch_5_9_0_it_it, "5_9_0", "it_it");
|
||||||
test_fetch!(test_fetch_latest_en_us, "latest", "en_us");
|
test_fetch!(test_fetch_latest_en_us, "latest", "en_us");
|
||||||
|
|
||||||
macro_rules! test_supported {
|
macro_rules! test_supported {
|
||||||
|
@ -140,7 +140,7 @@ mod tests {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
test_supported!(test_supported_4_9_0_en_us, "4_9_0", "en_us");
|
test_supported!(test_supported_5_9_0_en_us, "5_9_0", "en_us");
|
||||||
test_supported!(test_supported_4_9_0_it_it, "4_9_0", "it_it");
|
test_supported!(test_supported_5_9_0_it_it, "5_9_0", "it_it");
|
||||||
test_supported!(test_supported_latest_en_us, "latest", "en_us");
|
test_supported!(test_supported_latest_en_us, "latest", "en_us");
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ impl CardArt {
|
||||||
fn imgproxy_convert_to_jpg(url: &str) -> String {
|
fn imgproxy_convert_to_jpg(url: &str) -> String {
|
||||||
use base64::Engine;
|
use base64::Engine;
|
||||||
|
|
||||||
|
let url = url.replace("http:", "https:");
|
||||||
let url = base64::prelude::BASE64_URL_SAFE.encode(url);
|
let url = base64::prelude::BASE64_URL_SAFE.encode(url);
|
||||||
let url = format!("/{url}.jpg");
|
let url = format!("/{url}.jpg");
|
||||||
|
|
||||||
|
|
|
@ -220,10 +220,11 @@ pub enum CardKeyword {
|
||||||
Fated,
|
Fated,
|
||||||
|
|
||||||
#[serde(alias = "BlocksElusive")]
|
#[serde(alias = "BlocksElusive")]
|
||||||
/// ???
|
#[serde(alias = "BlockElusive")]
|
||||||
|
/// Sharpsight.
|
||||||
///
|
///
|
||||||
/// > Can block Elusive units.
|
/// > Can block Elusive units.
|
||||||
BlockElusive,
|
Sharpsight,
|
||||||
|
|
||||||
/// Fury.
|
/// Fury.
|
||||||
///
|
///
|
||||||
|
@ -331,6 +332,11 @@ pub enum CardKeyword {
|
||||||
///
|
///
|
||||||
/// > Can only be blocked by enemies with 3 or more Power.
|
/// > Can only be blocked by enemies with 3 or more Power.
|
||||||
Fearsome,
|
Fearsome,
|
||||||
|
|
||||||
|
/// Deathless.
|
||||||
|
///
|
||||||
|
/// > The next time this unit dies, remove Deathless and revive it Stunned with 1 Health.
|
||||||
|
Deathless,
|
||||||
|
|
||||||
/// Can't Block.
|
/// Can't Block.
|
||||||
CantBlock,
|
CantBlock,
|
||||||
|
@ -371,6 +377,23 @@ pub enum CardKeyword {
|
||||||
|
|
||||||
/// ???
|
/// ???
|
||||||
Freljord,
|
Freljord,
|
||||||
|
|
||||||
|
/// > Activatable once per round. When activated, play the skill of the current Act at Focus speed, then transform me to the next Act.
|
||||||
|
#[serde(rename = "Story:Focus")]
|
||||||
|
StoryFocus,
|
||||||
|
|
||||||
|
/// > Activatable once per round. When activated, play the skill of the current Act at Slow speed, then transform me to the next Act.
|
||||||
|
#[serde(rename = "Story:Slow")]
|
||||||
|
StorySlow,
|
||||||
|
|
||||||
|
/// > Applies a negative effect as long as it's in hand. Multiples of the same curse on a unit combine, increasing their cost and effect. Cannot be targeted in hand.
|
||||||
|
Curse,
|
||||||
|
|
||||||
|
/// This unit has +1|+1. This keyword can stack.
|
||||||
|
Spirit,
|
||||||
|
|
||||||
|
/// > This unit has -1|-1. This keyword can stack.
|
||||||
|
Gloom,
|
||||||
|
|
||||||
/// Unsupported card keyword.
|
/// Unsupported card keyword.
|
||||||
#[serde(other)]
|
#[serde(other)]
|
||||||
|
@ -464,12 +487,18 @@ impl CardKeyword {
|
||||||
CardKeyword::Nightfall => "",
|
CardKeyword::Nightfall => "",
|
||||||
CardKeyword::Daybreak => "",
|
CardKeyword::Daybreak => "",
|
||||||
CardKeyword::Plunder => "",
|
CardKeyword::Plunder => "",
|
||||||
CardKeyword::BlockElusive => "",
|
CardKeyword::Sharpsight => "",
|
||||||
CardKeyword::Flow => "",
|
CardKeyword::Flow => "",
|
||||||
CardKeyword::Capture => "<:capture:1056024295190577153>",
|
CardKeyword::Capture => "<:capture:1056024295190577153>",
|
||||||
CardKeyword::Attack => "",
|
CardKeyword::Attack => "",
|
||||||
CardKeyword::ElementalSkill => "<:elementalskill:1165762476974026814>",
|
CardKeyword::ElementalSkill => "<:elementalskill:1165762476974026814>",
|
||||||
CardKeyword::LevelUp => "",
|
CardKeyword::LevelUp => "",
|
||||||
|
CardKeyword::StoryFocus => "", // TODO
|
||||||
|
CardKeyword::StorySlow => "", // TODO
|
||||||
|
CardKeyword::Spirit => "", // TODO
|
||||||
|
CardKeyword::Gloom => "", // TODO
|
||||||
|
CardKeyword::Curse => "", // TODO
|
||||||
|
CardKeyword::Deathless => "", // TODO
|
||||||
CardKeyword::Freljord => "<:freljord:1056024331437735936>",
|
CardKeyword::Freljord => "<:freljord:1056024331437735936>",
|
||||||
CardKeyword::Unsupported => "<:invaliddeck:1056022952396730438>",
|
CardKeyword::Unsupported => "<:invaliddeck:1056022952396730438>",
|
||||||
}
|
}
|
||||||
|
@ -538,8 +567,9 @@ mod tests {
|
||||||
test_deserialization!(deserialize_elusive, r#""Elusive""#, CardKeyword::Elusive);
|
test_deserialization!(deserialize_elusive, r#""Elusive""#, CardKeyword::Elusive);
|
||||||
test_deserialization!(deserialize_stun, r#""Stun""#, CardKeyword::Stun);
|
test_deserialization!(deserialize_stun, r#""Stun""#, CardKeyword::Stun);
|
||||||
test_deserialization!(deserialize_fated, r#""Fated""#, CardKeyword::Fated);
|
test_deserialization!(deserialize_fated, r#""Fated""#, CardKeyword::Fated);
|
||||||
test_deserialization!(deserialize_blockelusive, r#""BlockElusive""#, CardKeyword::BlockElusive);
|
test_deserialization!(deserialize_blockelusive, r#""BlockElusive""#, CardKeyword::Sharpsight);
|
||||||
test_deserialization!(deserialize_blockelusive2, r#""BlocksElusive""#, CardKeyword::BlockElusive);
|
test_deserialization!(deserialize_blockelusive2, r#""BlocksElusive""#, CardKeyword::Sharpsight);
|
||||||
|
test_deserialization!(deserialize_sharpsight, r#""Sharpsight""#, CardKeyword::Sharpsight);
|
||||||
test_deserialization!(deserialize_fury, r#""Fury""#, CardKeyword::Fury);
|
test_deserialization!(deserialize_fury, r#""Fury""#, CardKeyword::Fury);
|
||||||
test_deserialization!(deserialize_barrier, r#""Barrier""#, CardKeyword::Barrier);
|
test_deserialization!(deserialize_barrier, r#""Barrier""#, CardKeyword::Barrier);
|
||||||
test_deserialization!(deserialize_immobile, r#""Immobile""#, CardKeyword::Immobile);
|
test_deserialization!(deserialize_immobile, r#""Immobile""#, CardKeyword::Immobile);
|
||||||
|
@ -570,5 +600,11 @@ mod tests {
|
||||||
test_deserialization!(deserialize_elementalskill, r#""ElementalSkill""#, CardKeyword::ElementalSkill);
|
test_deserialization!(deserialize_elementalskill, r#""ElementalSkill""#, CardKeyword::ElementalSkill);
|
||||||
test_deserialization!(deserialize_levelup, r#""LevelUp""#, CardKeyword::LevelUp);
|
test_deserialization!(deserialize_levelup, r#""LevelUp""#, CardKeyword::LevelUp);
|
||||||
test_deserialization!(deserialize_freljord, r#""Freljord""#, CardKeyword::Freljord);
|
test_deserialization!(deserialize_freljord, r#""Freljord""#, CardKeyword::Freljord);
|
||||||
|
test_deserialization!(deserialize_curse, r#""Curse""#, CardKeyword::Curse);
|
||||||
|
test_deserialization!(deserialize_spirit, r#""Spirit""#, CardKeyword::Spirit);
|
||||||
|
test_deserialization!(deserialize_gloom, r#""Gloom""#, CardKeyword::Gloom);
|
||||||
|
test_deserialization!(deserialize_deathless, r#""Deathless""#, CardKeyword::Deathless);
|
||||||
|
test_deserialization!(deserialize_storyslow, r#""Story:Slow""#, CardKeyword::StorySlow);
|
||||||
|
test_deserialization!(deserialize_storyfocus, r#""Story:Focus""#, CardKeyword::StoryFocus);
|
||||||
test_deserialization!(deserialize_unsupported, r#""Xyzzy""#, CardKeyword::Unsupported);
|
test_deserialization!(deserialize_unsupported, r#""Xyzzy""#, CardKeyword::Unsupported);
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,27 +96,29 @@ mod tests {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
test_fetch!(test_fetch_4_9_0_en_us_set1, "4_9_0", "en_us", "set1");
|
test_fetch!(test_fetch_5_9_0_en_us_set1, "5_9_0", "en_us", "set1");
|
||||||
test_fetch!(test_fetch_4_9_0_en_us_set2, "4_9_0", "en_us", "set2");
|
test_fetch!(test_fetch_5_9_0_en_us_set2, "5_9_0", "en_us", "set2");
|
||||||
test_fetch!(test_fetch_4_9_0_en_us_set3, "4_9_0", "en_us", "set3");
|
test_fetch!(test_fetch_5_9_0_en_us_set3, "5_9_0", "en_us", "set3");
|
||||||
test_fetch!(test_fetch_4_9_0_en_us_set4, "4_9_0", "en_us", "set4");
|
test_fetch!(test_fetch_5_9_0_en_us_set4, "5_9_0", "en_us", "set4");
|
||||||
test_fetch!(test_fetch_4_9_0_en_us_set5, "4_9_0", "en_us", "set5");
|
test_fetch!(test_fetch_5_9_0_en_us_set5, "5_9_0", "en_us", "set5");
|
||||||
test_fetch!(test_fetch_4_9_0_en_us_set6, "4_9_0", "en_us", "set6");
|
test_fetch!(test_fetch_5_9_0_en_us_set6, "5_9_0", "en_us", "set6");
|
||||||
test_fetch!(test_fetch_4_9_0_en_us_set6cde, "4_9_0", "en_us", "set6cde");
|
test_fetch!(test_fetch_5_9_0_en_us_set6cde, "5_9_0", "en_us", "set6cde");
|
||||||
test_fetch!(test_fetch_4_9_0_en_us_set7, "4_9_0", "en_us", "set7");
|
test_fetch!(test_fetch_5_9_0_en_us_set7, "5_9_0", "en_us", "set7");
|
||||||
test_fetch!(test_fetch_4_9_0_en_us_set7b, "4_9_0", "en_us", "set7b");
|
test_fetch!(test_fetch_5_9_0_en_us_set7b, "5_9_0", "en_us", "set7b");
|
||||||
test_fetch!(test_fetch_4_9_0_en_us_set8, "4_9_0", "en_us", "set8");
|
test_fetch!(test_fetch_5_9_0_en_us_set8, "5_9_0", "en_us", "set8");
|
||||||
|
test_fetch!(test_fetch_5_9_0_en_us_set9, "5_9_0", "en_us", "set9");
|
||||||
|
|
||||||
test_fetch!(test_fetch_4_9_0_it_it_set1, "4_9_0", "it_it", "set1");
|
test_fetch!(test_fetch_5_9_0_it_it_set1, "5_9_0", "it_it", "set1");
|
||||||
test_fetch!(test_fetch_4_9_0_it_it_set2, "4_9_0", "it_it", "set2");
|
test_fetch!(test_fetch_5_9_0_it_it_set2, "5_9_0", "it_it", "set2");
|
||||||
test_fetch!(test_fetch_4_9_0_it_it_set3, "4_9_0", "it_it", "set3");
|
test_fetch!(test_fetch_5_9_0_it_it_set3, "5_9_0", "it_it", "set3");
|
||||||
test_fetch!(test_fetch_4_9_0_it_it_set4, "4_9_0", "it_it", "set4");
|
test_fetch!(test_fetch_5_9_0_it_it_set4, "5_9_0", "it_it", "set4");
|
||||||
test_fetch!(test_fetch_4_9_0_it_it_set5, "4_9_0", "it_it", "set5");
|
test_fetch!(test_fetch_5_9_0_it_it_set5, "5_9_0", "it_it", "set5");
|
||||||
test_fetch!(test_fetch_4_9_0_it_it_set6, "4_9_0", "it_it", "set6");
|
test_fetch!(test_fetch_5_9_0_it_it_set6, "5_9_0", "it_it", "set6");
|
||||||
test_fetch!(test_fetch_4_9_0_it_it_set6cde, "4_9_0", "it_it", "set6cde");
|
test_fetch!(test_fetch_5_9_0_it_it_set6cde, "5_9_0", "it_it", "set6cde");
|
||||||
test_fetch!(test_fetch_4_9_0_it_it_set7, "4_9_0", "it_it", "set7");
|
test_fetch!(test_fetch_5_9_0_it_it_set7, "5_9_0", "it_it", "set7");
|
||||||
test_fetch!(test_fetch_4_9_0_it_it_set7b, "4_9_0", "it_it", "set7b");
|
test_fetch!(test_fetch_5_9_0_it_it_set7b, "5_9_0", "it_it", "set7b");
|
||||||
test_fetch!(test_fetch_4_9_0_it_it_set8, "4_9_0", "it_it", "set8");
|
test_fetch!(test_fetch_5_9_0_it_it_set8, "5_9_0", "it_it", "set8");
|
||||||
|
test_fetch!(test_fetch_5_9_0_it_it_set9, "5_9_0", "it_it", "set9");
|
||||||
|
|
||||||
test_fetch!(test_fetch_latest_en_us_set1, "latest", "en_us", "set1");
|
test_fetch!(test_fetch_latest_en_us_set1, "latest", "en_us", "set1");
|
||||||
test_fetch!(test_fetch_latest_en_us_set2, "latest", "en_us", "set2");
|
test_fetch!(test_fetch_latest_en_us_set2, "latest", "en_us", "set2");
|
||||||
|
@ -128,6 +130,7 @@ mod tests {
|
||||||
test_fetch!(test_fetch_latest_en_us_set7, "latest", "en_us", "set7");
|
test_fetch!(test_fetch_latest_en_us_set7, "latest", "en_us", "set7");
|
||||||
test_fetch!(test_fetch_latest_en_us_set7b, "latest", "en_us", "set7b");
|
test_fetch!(test_fetch_latest_en_us_set7b, "latest", "en_us", "set7b");
|
||||||
test_fetch!(test_fetch_latest_en_us_set8, "latest", "en_us", "set8");
|
test_fetch!(test_fetch_latest_en_us_set8, "latest", "en_us", "set8");
|
||||||
|
test_fetch!(test_fetch_latest_en_us_set9, "latest", "en_us", "set9");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,8 @@ pub enum CardRegion {
|
||||||
Evelynn,
|
Evelynn,
|
||||||
/// Runeterra: Bard.
|
/// Runeterra: Bard.
|
||||||
Bard,
|
Bard,
|
||||||
|
/// Runeterra: Elder Dragon.
|
||||||
|
ElderDragon,
|
||||||
|
|
||||||
/// Unsupported region.
|
/// Unsupported region.
|
||||||
#[serde(other)]
|
#[serde(other)]
|
||||||
|
@ -160,6 +161,7 @@ impl CardRegion {
|
||||||
CardRegion::PoroKing => "",
|
CardRegion::PoroKing => "",
|
||||||
CardRegion::Evelynn => "",
|
CardRegion::Evelynn => "",
|
||||||
CardRegion::Bard => "",
|
CardRegion::Bard => "",
|
||||||
|
CardRegion::ElderDragon => "",
|
||||||
CardRegion::Unsupported => "<:invaliddeck:1056022952396730438>",
|
CardRegion::Unsupported => "<:invaliddeck:1056022952396730438>",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,10 +43,14 @@ pub enum CardSet {
|
||||||
/// Heart of the Huntress.
|
/// Heart of the Huntress.
|
||||||
#[serde(rename = "Set7b")]
|
#[serde(rename = "Set7b")]
|
||||||
HeartOfTheHuntress,
|
HeartOfTheHuntress,
|
||||||
|
|
||||||
/// Fate's Voyage.
|
/// Fate's Voyage.
|
||||||
#[serde(rename = "Set8")]
|
#[serde(rename = "Set8")]
|
||||||
FatesVoyage,
|
FatesVoyage,
|
||||||
|
|
||||||
|
/// Dreamlit Paths.
|
||||||
|
#[serde(rename = "Set9")]
|
||||||
|
DreamlitPaths,
|
||||||
|
|
||||||
/// Events, cards released "outside" a set.
|
/// Events, cards released "outside" a set.
|
||||||
#[serde(rename = "SetEvent")]
|
#[serde(rename = "SetEvent")]
|
||||||
|
@ -116,7 +120,8 @@ impl CardSet {
|
||||||
CardSet::GloryInNavori => "<:glory_in_navori:1095363395890458756>",
|
CardSet::GloryInNavori => "<:glory_in_navori:1095363395890458756>",
|
||||||
CardSet::HeartOfTheHuntress => "<:heart_of_the_huntress:1165769749922320494>",
|
CardSet::HeartOfTheHuntress => "<:heart_of_the_huntress:1165769749922320494>",
|
||||||
CardSet::FatesVoyage => "<:fates_voyage:1165769932995317851>",
|
CardSet::FatesVoyage => "<:fates_voyage:1165769932995317851>",
|
||||||
CardSet::Events => "",
|
CardSet::DreamlitPaths => "", // TODO
|
||||||
|
CardSet::Events => "", // TODO
|
||||||
CardSet::Unsupported => "<:invaliddeck:1056022952396730438>",
|
CardSet::Unsupported => "<:invaliddeck:1056022952396730438>",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue