mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-05-13 11:37:33 -05:00
Fix lottery ensured characters
This commit is contained in:
parent
4a776eb526
commit
2ce9aa4868
1 changed files with 7 additions and 5 deletions
|
@ -72,6 +72,7 @@ fn get_random_cards(id: i64, mut count: usize) -> JsonValue {
|
|||
let mut rv = array![];
|
||||
let mut promised = false;
|
||||
|
||||
if count > 1 {
|
||||
for (_i, item) in databases::RARITY[id.to_string()].members().enumerate() {
|
||||
if item["ensured"].as_i32().unwrap() == 1 {
|
||||
get_random_card(&item, &mut rv, &mut rng);
|
||||
|
@ -79,6 +80,7 @@ fn get_random_cards(id: i64, mut count: usize) -> JsonValue {
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if promised {
|
||||
count -= 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue