Skip to content

Commit

Permalink
revamp possessed sword, amber amulet
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Aug 12, 2024
1 parent ce13001 commit 5469af4
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 59 deletions.
12 changes: 6 additions & 6 deletions src/cards.csv
Original file line number Diff line number Diff line change
Expand Up @@ -664,10 +664,10 @@
8015|Neurotoxin|10|3|2|3|||neuroify|
6016|Time Barrier|10|1|2|7|||shield=blockwithcharge+draw=gaintimecharge|charges=5+stackable
8016|Time Barrier|10|1|2|5|||shield=blockwithcharge+draw=gaintimecharge|charges=5+stackable
6017|Innovation|10|3|3|4|||innovation|
8017|Innovation|10|3|3|3|||innovation|
6018|Amber Amulet|10|0|3|6|6|14|3:4=fossilize|
8018|Amber Amulet|10|0|3|6|8|14|2:4=fossilize|
6017|Innovation|10|3|3|4|||innovate 3|
8017|Innovation|10|3|3|3|||innovate 3|
6018|Amulet|10|0|3|5|0|2|1=innovate 2+hit=mill|
8018|Amulet|10|0|3|6|1|4|0=innovate 2+hit=mill|
6020|Golden Nymph|10|4|4|8|6|4|2=precognition|
8020|Time Nymph|10|4|4|8|7|5|2=precognition|
6021|Time Bomb|10|4|2|1||2|0=tick|
Expand Down Expand Up @@ -726,8 +726,8 @@
8114|Cloak|11|2|1|2|||losecharge|cloak+charges=4
6115|Shadling|11|4|2|1||2|2=siphonstrength|nocturnal
8115|Shadling|11|4|2|1|2|3|2=siphonstrength|nocturnal
6116|Possessed Sword|11|0|3|3|1|1|ownplay=haunt|nocturnal
8116|Possessed Sword|11|0|3|3|2|2|ownplay=haunt|nocturnal
6116|Scythe|11|0|3|3|6|6|1=haunt|nocturnal
8116|Scythe|11|0|3|2|6|6|1=haunt|nocturnal
6120|Black Nymph|11|4|4|8|6|6|1=liquid|nocturnal
8120|Dark Nymph|11|4|4|8|7|7|1=liquid|nocturnal
6122|Despair|11|1|2|6|||shield=despair|
Expand Down
4 changes: 2 additions & 2 deletions src/rs/src/aieval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,11 +444,11 @@ fn eval_skill(
Skill::hush => 3 * PREC,
Skill::icebolt | Skill::v_icebolt(_) => 10 * PREC,
Skill::ignite => 10 * PREC,
Skill::immolate(_) => 5 * PREC,
Skill::immolate(x) => x as i32 * (PREC / 2),
Skill::improve | Skill::v_improve => 6 * PREC,
Skill::inertia => 2 * PREC,
Skill::ink => 3 * PREC,
Skill::innovation => 3 * PREC,
Skill::innovate(x) => x as i32 * PREC,
Skill::integrity | Skill::v_integrity => 4 * PREC,
Skill::jelly => 5 * PREC,
Skill::jetstream => 5 * (PREC / 2),
Expand Down
74 changes: 27 additions & 47 deletions src/rs/src/skill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@ pub enum Skill {
hasten,
hatch,
haunt,
hauntatk(i16),
haunthp(i16),
haunted(i16),
heal,
healblocked,
heatmirror,
Expand All @@ -415,7 +414,7 @@ pub enum Skill {
inertia,
inflation,
ink,
innovation,
innovate(u8),
integrity,
jelly,
jetstream,
Expand Down Expand Up @@ -923,8 +922,7 @@ impl<'a> Display for SkillName<'a> {
Skill::databloat => f.write_str("databloat"),
Skill::datashrink => f.write_str("datashrink"),
Skill::haunt => f.write_str("haunt"),
Skill::haunthp(..) => Ok(()),
Skill::hauntatk(..) => Ok(()),
Skill::haunted(..) => f.write_str("haunted"),
Skill::throwfeather => f.write_str("throwfeather"),
Skill::heatstroke => f.write_str("heatstroke"),
Skill::grab2h => f.write_str("grab2h"),
Expand Down Expand Up @@ -1099,7 +1097,7 @@ impl<'a> Display for SkillName<'a> {
Skill::inertia => f.write_str("inertia"),
Skill::inflation => f.write_str("inflation"),
Skill::ink => f.write_str("ink"),
Skill::innovation => f.write_str("innovation"),
Skill::innovate(x) => write!(f, "innovate{x}"),
Skill::integrity => f.write_str("integrity"),
Skill::jelly => f.write_str("jelly"),
Skill::jetstream => f.write_str("jetstream"),
Expand Down Expand Up @@ -1348,8 +1346,6 @@ impl Skill {
| Self::deepdiveproc2
| Self::dshieldoff
| Self::elf | Self::firebrand
| Self::hauntatk(..)
| Self::haunthp(..)
| Self::martyr | Self::mummy
| Self::obsession
| Self::predatoroff
Expand Down Expand Up @@ -1470,12 +1466,13 @@ impl Skill {
}
Self::grab2h => tgt!(or shie and own card),
Self::guard => Tgt::crea,
Self::haunt => Tgt::crea,
Self::heal => tgt!(or crea play),
Self::holylight => tgt!(or crea play),
Self::icebolt => tgt!(or crea play),
Self::immolate(_) => tgt!(and crea own),
Self::improve => Tgt::crea,
Self::innovation => Tgt::card,
Self::innovate(_) => Tgt::card,
Self::jelly => Tgt::crea,
Self::jetstream => Tgt::crea,
Self::lightning => tgt!(or crea play),
Expand Down Expand Up @@ -1656,27 +1653,24 @@ impl Skill {
}
}
Skill::haunt => {
let owner = ctx.get_owner(c);
let skele = ctx.new_thing(card::As(ctx.get(c, Stat::card), card::Skeleton), owner);
ctx.set(skele, Stat::hp, 0);
ctx.set(skele, Stat::maxhp, 0);
ctx.set(skele, Stat::atk, 0);
ctx.addCrea(owner, skele);
if ctx.getIndex(skele) != -1 {
ctx.get_thing_mut(skele)
.skill
.insert(Event::Hp, Cow::from(Vec::from(&[Skill::haunthp(c)])));
ctx.get_thing_mut(c)
.skill
.insert(Event::Hp, Cow::from(Vec::from(&[Skill::haunthp(skele)])));
ctx.get_thing_mut(skele)
.skill
.insert(Event::Buff, Cow::from(Vec::from(&[Skill::hauntatk(c)])));
ctx.get_thing_mut(c)
.skill
.insert(Event::Buff, Cow::from(Vec::from(&[Skill::hauntatk(skele)])));
let own = ctx.get_owner(c);
let thing = ctx.get_thing_mut(t);
if let Some(smap) = thing.skill.get_mut(Event::OwnDeath) {
smap.extend(&[Skill::haunted(own)]);
} else {
thing.skill.insert(Event::OwnDeath, Cow::from(Vec::from(&[Skill::haunted(own)])));
}
}
Skill::haunted(own) => {
let atk = ctx.get(t, Stat::atk);
let hp = ctx.get(t, Stat::maxhp);
let card = ctx.get(t, Stat::card);
let skele = ctx.new_thing(card::As(card, card::Skeleton), own);
ctx.set(skele, Stat::atk, atk);
ctx.set(skele, Stat::maxhp, hp);
ctx.set(skele, Stat::hp, hp);
ctx.addCrea(own, skele);
}
Skill::throwfeather => {
if ctx.maybeDecrStatus(c, Stat::charges) != 0 {
ctx.addskills(t, Event::Hp, &[Skill::featherdr]);
Expand Down Expand Up @@ -3191,11 +3185,11 @@ impl Skill {
ctx.set(p, Stat::charges, 1);
ctx.addPerm(owner, p);
}
Self::innovation => {
Self::innovate(x) => {
let town = ctx.get_owner(t);
if !ctx.sanctified(town) {
ctx.die(t);
for _ in 0..3 {
for _ in 0..x {
ctx.drawcard(town);
}
}
Expand Down Expand Up @@ -3619,7 +3613,9 @@ impl Skill {
}
}
Self::mill => {
ctx.mill(t, 1);
if throttle(ctx, data, c) && ctx.get_kind(t) == Kind::Player {
ctx.mill(t, 1);
}
}
Self::millpillar => {
if let Some(&card) = ctx.get_player(t).deck.last() {
Expand Down Expand Up @@ -5619,8 +5615,6 @@ impl Skill {
| Self::featherdr
| Self::fiery
| Self::hammer
| Self::haunthp(..)
| Self::hauntatk(..)
| Self::hope
| Self::poisondr
| Self::skeletoncount
Expand Down Expand Up @@ -5693,20 +5687,6 @@ impl Skill {
let mark = ctx.get_player(ctx.get_owner(c)).mark as i16;
(mark == etg::Gravity || mark == etg::Earth) as i16
}
Skill::haunthp(o) => {
if ctx.getIndex(o) != -1 && ctx.hasskill(o, Event::Hp, Skill::haunthp(c)) {
ctx.get(o, Stat::hp)
} else {
0
}
}
Skill::hauntatk(o) => {
if ctx.getIndex(o) != -1 && ctx.hasskill(o, Event::Buff, Skill::hauntatk(c)) {
ctx.get(o, Stat::atk)
} else {
0
}
}
Self::hope => ctx
.get_player(ctx.get_owner(c))
.creatures
Expand Down
12 changes: 8 additions & 4 deletions src/rs/src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@ impl<'a> SkillThing<'a> {
Skill::hasten if ev == Event::OwnDiscard => Cow::from("When discarded, you draw a card"),
Skill::hatch =>
Cow::from("Transform this creature into a random creature. Caster can be reactivated"),
Skill::haunt => Cow::from("Summon skeleton, haunt each other"),
Skill::haunt => Cow::from("When target creature dies, summon a fully health Skeleton with the same stats"),
Skill::haunted(own) => Cow::from(format!("When this dies, summon a fully health Skeleton with the same stats for player {}", own)),
Skill::heal => Cow::from("Target creature or player heals 20HP"),
Skill::healblocked => Cow::from("When this creature attacks, if any damage is blocked by opponent's shield, heal yourself for the amount this creature's damage was blocked"),
Skill::heatmirror => Cow::from(if self.upped() {
Expand Down Expand Up @@ -443,8 +444,8 @@ impl<'a> SkillThing<'a> {
Skill::inertia => Cow::from("When any card you own is targeted by either player, gain 2:3"),
Skill::inflation => Cow::from("Increase the cost of all active skills by 1"),
Skill::ink => Cow::from("Summon a Cloak that lasts 1 turn"),
Skill::innovation =>
Cow::from("Discard target card in either player's hand. The owner of target card draws three cards. Destroy top card of your deck"),
Skill::innovate(x) =>
Cow::from(format!("Discard target card in either player's hand. The owner of target card draws {} cards. Destroy top card of your deck", x)),
Skill::integrity =>
Cow::from("Destroy all shards in your hand to play a Shard Golem with stats & skills based on the shards destroyed"),
Skill::jelly =>
Expand Down Expand Up @@ -491,7 +492,10 @@ impl<'a> SkillThing<'a> {
Cow::from("Change your mark to target's element.\nIncrease your mark power by 1"),
Skill::midas =>
Cow::from("Target permanent becomes a Golden Relic with \"2:0: Sacrifice this card & draw a card.\" If target is a weapon, its strength is 1. If target is a shield, its damage reduction is 1"),
Skill::mill => Cow::from("Destroy top card of target player's deck"),
Skill::mill => Cow::from(match ev {
Event::Hit => "Destroy top card of player's deck on hit. Throttled (only triggers twice from Adrenaline)",
_ => "Destroy top card of target player's deck",
}),
Skill::millpillar =>
Cow::from("If top card of target player's deck is a pillar, pendulum, or tower, destroy that card"),
Skill::mimic =>
Expand Down

0 comments on commit 5469af4

Please sign in to comment.