diff --git a/src/rs/src/skill.rs b/src/rs/src/skill.rs index 030eac3e..6f5d1fc2 100644 --- a/src/rs/src/skill.rs +++ b/src/rs/src/skill.rs @@ -3121,57 +3121,51 @@ impl Skill { Self::imbue => { let isweap = ctx.get_card(ctx.get(t, Stat::card)).kind == Kind::Weapon; let pl = ctx.get_player(ctx.get_owner(t)); - let equip = if isweap { - pl.weapon - } else { - pl.shield - }; + let equip = if isweap { pl.weapon } else { pl.shield }; + ctx.die(t); if equip == 0 { return; } - ctx.die(t); - ctx.unsummon(equip); - ctx.fx(t, Fx::Endow); - let tgt = ctx.get_thing(t); - let tstatus = tgt.status.clone(); - let mut setcast = false; - { - let newskill = tgt.skill.clone(); - let tflag = tgt.flag.0; - let mut sader = ctx.get_thing_mut(equip); - for (nk, nv) in newskill.into_iter() { - match sader.skill.entry(nk) { - SkillsEntry::Occupied(sk) => { - if nk == Event::Cast { - continue - } - sk.into_mut().extend(nv.as_ref()); - } - SkillsEntry::Vacant(sk) => { - if nk == Event::Cast { - setcast = true; - } - sk.insert(nv); - } + ctx.unsummon(equip); + ctx.fx(t, Fx::Endow); + let tgt = ctx.get_thing(t); + let tstatus = tgt.status.clone(); + let mut setcast = false; + { + let newskill = tgt.skill.clone(); + let tflag = tgt.flag.0; + let mut sader = ctx.get_thing_mut(equip); + for (nk, nv) in newskill.into_iter() { + match sader.skill.entry(nk) { + SkillsEntry::Occupied(sk) => { + if nk == Event::Cast { + continue; } + sk.into_mut().extend(nv.as_ref()); + } + SkillsEntry::Vacant(sk) => { + if nk == Event::Cast { + setcast = true; + } + sk.insert(nv); } - sader.flag.0 |= tflag; } - for &(k, v) in tstatus.iter() { - match k { - Stat::hp - | Stat::maxhp - | Stat::atk - | Stat::card - | Stat::costele => (), - Stat::castele - | Stat::cast => if setcast { - ctx.set(equip, k, v) - }, - Stat::adrenaline => ctx.set(equip, k, v), - _ => ctx.incrStatus(equip, k, v), + } + sader.flag.0 |= tflag; + sader.flag.0 &= !Flag::additive; + } + for &(k, v) in tstatus.iter() { + match k { + Stat::hp | Stat::maxhp | Stat::atk | Stat::card | Stat::costele => (), + Stat::castele | Stat::cast => { + if setcast { + ctx.set(equip, k, v) } } + Stat::adrenaline => ctx.set(equip, k, v), + _ => ctx.incrStatus(equip, k, v), + } + } } Self::immolate(x) => { ctx.die(t); diff --git a/src/rs/src/text.rs b/src/rs/src/text.rs index d368e2d6..57f4799a 100644 --- a/src/rs/src/text.rs +++ b/src/rs/src/text.rs @@ -438,6 +438,7 @@ impl<'a> SkillThing<'a> { Skill::ignite => Cow::from("Deal 20 spell damage to opponent. Deal 1 spell damage to each creature"), Skill::ignitediscard => Cow::from("When discarded, deal 5 spell damage to opponent"), + Skill::imbue => Cow::from("Discard target equipment card. Imbue on equipped equipment. Return imbued equipment to hand. Imbued equipment is not additive"), Skill::immolate(x) => Cow::from(format!("Sacrifice creature you control. Gain {}:6 plus 1 quanta of each other element", x+1)), Skill::improve =>