Skip to content

Commit

Permalink
Despair: synergize with all nocturnal creatures, not just Devourers
Browse files Browse the repository at this point in the history
Shadling: cost 1
  • Loading branch information
serprex committed Sep 10, 2023
1 parent 02a4fcb commit 0fae18b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Cards.json
Expand Up @@ -79,6 +79,6 @@
[["Photon",5801,0,1,"ownplay=quanta 8",1,1,"airborne"],["Ray of Light",7801,0,1,"quanta 8",1,1,"airborne"],["White Dragon",5802,12,2,"",10,10,"airborne"],["Light Dragon",7802,12,2,"",12,12,"airborne"],["Pegasus",5803,3,1,"1:9=dive",3,3,"airborne"],["Pegasus",7803,4,1,"1:9=dive",4,4,"airborne"],["Guardian Angel",5806,2,1,"1=mend",0,20,"airborne"],["Archangel",7806,6,1,"1=mend",7,7,"airborne"],["Crusader",5813,5,1,"2=endow",2,4,""],["Crusader",7813,5,1,"2=endow",3,5,""],["Monk",5815,4,2,"hit=disarm",3,5,""],["Monk",7815,3,2,"hit=disarm",3,5,""],["Surgeon",5816,2,1,"1=clear",2,3,"aquatic"],["Surgeon",7816,3,1,"1=clear",4,5,"aquatic"],["Martyr",5819,4,2,"owndmg=martyr",3,6,""],["Martyr",7819,3,2,"owndmg=martyr",3,7,""],["White Nymph",5820,9,4,"4=luciferin",6,9,""],["Light Nymph",7820,9,4,"3=luciferin",6,9,""],["Null Mantis",5826,7,1,"1:12=nullspell+prespell=evadespell",7,4,""],["Minor Null Mantis",7826,2,1,"2:12=nullspell+prespell=evadespell",4,2,""],["Byakko",5827,6,3,"blocked=virtue",7,2,""],["Byakko",7827,7,3,"blocked=virtue",9,3,""]],
[["Dragonfly",5901,1,1,"quanta 9",2,1,"airborne"],["Damselfly",7901,0,1,"quanta 9",2,1,"airborne"],["Wyrm",5902,4,1,"1=dive",3,4,"airborne"],["Wyrm",7902,4,1,"2=dive",5,3,"airborne"],["Azure Dragon",5903,9,2,"",9,6,"airborne"],["Sky Dragon",7903,12,2,"",13,6,"airborne"],["Firefly Queen",5907,6,2,"2:5=summon 5908",3,7,"airborne"],["Firefly Queen",7907,6,2,"2:5=summon 7908",3,7,"airborne"],["Firefly",5908,2,1,"quanta 8",3,2,"airborne+nocturnal"],["Firefly",7908,2,1,"quanta 6",4,3,"airborne+nocturnal"],["Gryphon",5915,6,1,"",7,3,"airborne"],["Gryphon",7915,6,1,"",7,5,"airborne"],["Whim",5916,2,1,"1=fickle",2,2,"airborne"],["Whim",7916,2,1,"1=fickle",3,3,"airborne"],["Fenghuang",5917,1,2,"2=ren+predeath=bounce",1,1,"airborne"],["Fenghuang",7917,1,2,"2=ren+predeath=bounce",2,1,"airborne"],["Owl",5918,5,2,"ownplay=reveal+turnstart=reveal",4,4,"airborne+nocturnal"],["Owl",7918,5,2,"ownplay=reveal+turnstart=reveal",5,5,"airborne+nocturnal"],["Blue Nymph",5920,9,4,"3=gas",4,5,""],["Air Nymph",7920,9,4,"3=gas",5,6,""],["Pixie",5921,3,2,"2:1=trick",1,2,"airborne"],["Pixie",7921,2,2,"2:1=trick",1,2,"airborne"],["Thunderbird",5925,3,1,"ownplay=drawpillar+1:10=millpillar",3,2,"airborne"],["Thunderbird",7925,3,1,"ownplay=drawpillar+1:10=millpillar",4,4,"airborne"]],
[["D\u00e9j\u00e0 Vu",6001,1,1,"1=deja",1,1,"airborne"],["D\u00e9j\u00e0 Vu",8001,1,1,"1=deja",2,2,"airborne"],["Fate Egg",6002,1,1,"1=hatch",0,1,""],["Fate Egg",8002,1,1,"1=hatch",0,1,""],["Devonian Dragon",6006,10,2,"",10,5,"airborne"],["Silurian Dragon",8006,11,2,"",13,4,"airborne"],["Anubis",6007,8,2,"2:12=quinttog",5,8,""],["Anubis",8007,8,2,"1:12=quinttog",5,8,""],["Scarab",6010,2,1,"1:3=devour+hp=swarm",2,0,"airborne"],["Scarab",8010,2,1,"1:3=devour+hp=swarm",3,0,"airborne"],["Pharaoh",6012,9,3,"2=summon 6010",4,9,""],["Pharaoh",8012,9,3,"2=summon 8010",4,9,""],["Dune Scorpion",6013,2,1,"hit=neuro",0,1,"poisonous"],["Dune Scorpion",8013,2,1,"hit=neuro",0,3,"poisonous"],["Ghost of the Past",6014,6,1,"owndiscard=obsession",7,4,""],["Ghost of the Past",8014,7,1,"owndiscard=obsession",9,4,""],["Golden Nymph",6020,8,4,"2=precognition",6,4,""],["Time Nymph",8020,8,4,"2=precognition",7,5,""],["Time Bomb",6021,1,2,"0=tick",0,3,""],["Time Terror",8021,2,2,"1=tick",1,6,""],["Clockwork Golem",6022,4,1,"1:3=wind+postauto=halveatk",8,4,"golem"],["Minor Clockwork Golem",8022,1,1,"1:3=wind+postauto=halveatk",4,8,"golem"],["Hognose",6027,7,1,"",4,3,"aquatic+adrenaline=1"],["Hognose",8027,6,1,"",4,3,"aquatic+adrenaline=1"]],
[["Black Dragon",6101,10,2,"",10,5,"airborne+nocturnal"],["Obsidian Dragon",8101,12,2,"",12,7,"airborne+nocturnal"],["Devourer",6102,2,2,"1:4=burrow+siphon",0,2,"nocturnal"],["Pest",8102,2,2,"1:4=burrow+siphon",0,4,"nocturnal"],["Parasite",6103,2,1,"1:2=poison 1",2,1,"poisonous+nocturnal+aquatic"],["Bloodsucker",8103,2,1,"1:2=poison 1",3,1,"poisonous+nocturnal+aquatic"],["Minor Vampire",6109,3,1,"hit=vampire",2,2,"airborne+nocturnal"],["Vampire",8109,5,1,"hit=vampire",4,3,"airborne+nocturnal"],["Gargoyle",6111,5,1,"1:4=stoneform",6,3,"airborne+nocturnal"],["Gargoyle",8111,5,1,"1:4=stoneform",7,3,"airborne+nocturnal"],["Voodoo Doll",6112,2,1,"",0,16,"voodoo+nocturnal"],["Voodoo Doll",8112,2,1,"",0,20,"voodoo+nocturnal"],["Shadling",6115,2,2,"2=siphonstrength",0,2,"nocturnal"],["Shadling",8115,2,2,"2=siphonstrength",1,3,"nocturnal"],["Black Nymph",6120,8,4,"1=liquid",6,6,"nocturnal"],["Dark Nymph",8120,8,4,"1=liquid",7,7,"nocturnal"],["Shadow",6127,"1:0",1,"",5,0,"nocturnal"],["Tall Shadow",8127,"1:0",1,"",6,0,"nocturnal"],["Goon",6128,4,1,"destroy=loot",4,4,"nocturnal"],["Thug",8128,4,1,"destroy=loot",5,5,"nocturnal"],["Shark of Void",6129,6,2,"hit=reducemaxhp",5,6,"nocturnal+aquatic"],["Shark of Void",8129,6,2,"hit=reducemaxhp",6,7,"nocturnal+aquatic"],["Black Cat",6131,2,1,"owndeath=catlife",1,2,"lives=9+nocturnal"],["Black Cat",8131,2,1,"owndeath=catlife",2,2,"lives=9+nocturnal"]],
[["Black Dragon",6101,10,2,"",10,5,"airborne+nocturnal"],["Obsidian Dragon",8101,12,2,"",12,7,"airborne+nocturnal"],["Devourer",6102,2,2,"1:4=burrow+siphon",0,2,"nocturnal"],["Pest",8102,2,2,"1:4=burrow+siphon",0,4,"nocturnal"],["Parasite",6103,2,1,"1:2=poison 1",2,1,"poisonous+nocturnal+aquatic"],["Bloodsucker",8103,2,1,"1:2=poison 1",3,1,"poisonous+nocturnal+aquatic"],["Minor Vampire",6109,3,1,"hit=vampire",2,2,"airborne+nocturnal"],["Vampire",8109,5,1,"hit=vampire",4,3,"airborne+nocturnal"],["Gargoyle",6111,5,1,"1:4=stoneform",6,3,"airborne+nocturnal"],["Gargoyle",8111,5,1,"1:4=stoneform",7,3,"airborne+nocturnal"],["Voodoo Doll",6112,2,1,"",0,16,"voodoo+nocturnal"],["Voodoo Doll",8112,2,1,"",0,20,"voodoo+nocturnal"],["Shadling",6115,1,2,"2=siphonstrength",0,2,"nocturnal"],["Shadling",8115,1,2,"2=siphonstrength",2,3,"nocturnal"],["Black Nymph",6120,8,4,"1=liquid",6,6,"nocturnal"],["Dark Nymph",8120,8,4,"1=liquid",7,7,"nocturnal"],["Shadow",6127,"1:0",1,"",5,0,"nocturnal"],["Tall Shadow",8127,"1:0",1,"",6,0,"nocturnal"],["Goon",6128,4,1,"destroy=loot",4,4,"nocturnal"],["Thug",8128,4,1,"destroy=loot",5,5,"nocturnal"],["Shark of Void",6129,6,2,"hit=reducemaxhp",5,6,"nocturnal+aquatic"],["Shark of Void",8129,6,2,"hit=reducemaxhp",6,7,"nocturnal+aquatic"],["Black Cat",6131,2,1,"owndeath=catlife",1,2,"lives=9+nocturnal"],["Black Cat",8131,2,1,"owndeath=catlife",2,2,"lives=9+nocturnal"]],
[["Spark",6201,0,1,"owndeath=quanta 12",3,0,"airborne"],["Ball Lightning",8201,0,1,"owndeath=quanta 12",5,0,"airborne"],["Immortal",6204,5,1,"",4,3,"immaterial"],["Immortal",8204,5,1,"",5,3,"immaterial"],["Phase Dragon",6207,12,2,"",8,6,"immaterial+airborne"],["Phase Dragon",8207,13,2,"",10,6,"immaterial+airborne"],["Phase Spider",6208,3,1,"1:9=web",4,2,""],["Phase Recluse",8208,4,1,"1:9=web",7,2,""],["Psion",6213,4,2,"",4,3,"psionic"],["Psion",8213,4,2,"",5,4,"psionic"],["Phase Salvager",6214,1,1,"destroy=salvage",5,0,""],["Phase Salvager",8214,1,1,"destroy=salvage",7,0,""],["Blue Mage",6215,3,2,"0=siphonactive",3,3,""],["Blue Mage",8215,3,2,"0=siphonactive",3,5,""],["Phantom",6217,0,2,"",1,1,"psionic+nocturnal+token"],["Phantom",8217,0,2,"",2,1,"psionic+nocturnal+token"],["Byt",6218,1,1,"0=upload",0,6,""],["Byt",8218,1,1,"0=upload",0,9,""],["Turquoise Nymph",6220,8,4,"2=quint",7,5,""],["Aether Nymph",8220,8,4,"2=quint",8,5,""],["Phase Golem",6221,2,1,"",2,1,"immaterial+golem"],["Phase Golem",8221,2,1,"",3,1,"immaterial+golem"],["Space Whale",6226,6,1,"",8,10,"aquatic+frozen=2"],["Space Whale",8226,6,1,"",10,10,"aquatic+frozen=2"]]]
]
5 changes: 1 addition & 4 deletions src/rs/server/src/handlews.rs
Expand Up @@ -717,14 +717,11 @@ pub async fn handle_ws(
let mut p = 0.05;
let p0 = 1.0 - p;
let mut idx = 0;
while idx < len && r > p {
while idx + 1 < len && r > p {
r -= p;
p *= p0;
idx += 1;
}
if idx == len {
idx = rng.gen_range(0..len);
}
(rng.gen::<u32>(), idx)
};
if let Ok(row) = client.query_one("select u.name, a.deck, a.hp, a.mark, a.draw, a.code from arena a join users u on u.id = a.user_id where a.arena_id = $1 and a.user_id <> $2 order by a.\"rank\" limit 1 offset $3", &[&arenaid, &userid, &idx]).await {
Expand Down
9 changes: 4 additions & 5 deletions src/rs/src/skill.rs
Expand Up @@ -1729,14 +1729,13 @@ impl Skill {
Self::despair => {
if !ctx.get(t, Flag::ranged) {
let owner = ctx.get_owner(c);
let devs = ctx
let nocturnal: u32 = ctx
.get_player(owner)
.creatures
.clone()
.iter()
.filter(|&&cr| ctx.hasskill(cr, Event::OwnAttack, Skill::siphon))
.count();
if ctx.rng() < 1.4 - (0.95f64).powf(devs as f64) {
.map(|&cr| ctx.get(cr, Flag::nocturnal) as u32)
.sum();
if ctx.rng_ratio(40 + nocturnal, 100) {
ctx.incrAtk(t, -1);
ctx.dmg(t, 1);
}
Expand Down
2 changes: 1 addition & 1 deletion src/skillText.js
Expand Up @@ -211,7 +211,7 @@ const data = {
deja: 'Remove this ability & summon a copy of this creature.',
deployblobs: 'Summon 3 Blobs. Gain -2|-2.',
despair:
'Non-ranged attackers have a 40% chance plus 5% per 1:11 producing creature you control to gain -1|-1.',
'Non-ranged attackers have a 50% chance plus 1% per nocturnal creature you control to gain -1|-1.',
destroy: 'Destroy target permanent.',
destroycard:
"Discard target card, or destroy top card of target player's deck.",
Expand Down

0 comments on commit 0fae18b

Please sign in to comment.