fix taunt

This commit is contained in:
ntr 2019-03-30 17:52:31 +11:00
parent 9f462bbfcc
commit 0c0adfb2fd
3 changed files with 9 additions and 2 deletions

View File

@ -18,6 +18,7 @@
fix taunt
decay is op
siphon might have a prob
cryp vbox

View File

@ -392,7 +392,9 @@ impl Game {
}
fn get_targets(&self, skill: Skill, source: &Cryp, target_cryp_id: Uuid) -> Vec<Uuid> {
let target_team = self.teams.iter().find(|t| t.id == source.account).unwrap();
let target_team = self.teams.iter()
.find(|t| t.cryps.iter().any(|c| c.id == target_cryp_id))
.unwrap();
if let Some(t) = target_team.taunting() {
return vec![t.id];

View File

@ -289,7 +289,11 @@ impl Effect {
_ => false,
},
Effect::Strangle => skill != Skill::StrangleTick,
Effect::Strangling => true,
Effect::Strangling => match skill.category() {
Category::BlueTick => false,
Category::RedTick => false,
_ => true,
},
Effect::Banish => true,
Effect::Injured => match skill.category() {
Category::Green => true,