diff --git a/client/src/components/game.component.jsx b/client/src/components/game.component.jsx
index 496c867f..e35d4bb6 100644
--- a/client/src/components/game.component.jsx
+++ b/client/src/components/game.component.jsx
@@ -148,12 +148,8 @@ function GamePanel(props) {
);
}
- function resolutionEl(r) {
- return
{JSON.stringify(resolution)}
;
- }
-
const selectedSkills = resolution
- ? resolutionEl(resolution)
+ ?
: playerTeam.cryps.map((c, i) => stackElement(c, i));
// const mobileSkills = activeCryp
diff --git a/client/src/utils.jsx b/client/src/utils.jsx
index 647c9ff2..00a24307 100644
--- a/client/src/utils.jsx
+++ b/client/src/utils.jsx
@@ -188,7 +188,10 @@ function getCombatText(cryp, resolution) {
if (type === 'Damage') {
const { skill, amount, mitigation, colour } = event;
- return amount;
+ const mitigationText = mitigation
+ ? `(${mitigation})`
+ : '';
+ return `${amount} ${mitigationText}`;
}
if (type === 'Healing') {
diff --git a/server/src/player.rs b/server/src/player.rs
index 539f4f18..1c7f9328 100644
--- a/server/src/player.rs
+++ b/server/src/player.rs
@@ -63,14 +63,14 @@ impl Player {
pub fn add_win(&mut self) -> &mut Player {
self.score.wins += 1;
self.set_ready(false);
- self.vbox.balance_add(16);
+ self.vbox.balance_add(12);
self
}
pub fn add_loss(&mut self) -> &mut Player {
self.score.losses += 1;
self.set_ready(false);
- self.vbox.balance_add(12);
+ self.vbox.balance_add(9);
self
}
diff --git a/server/src/skill.rs b/server/src/skill.rs
index f98c570e..d30ecf52 100644
--- a/server/src/skill.rs
+++ b/server/src/skill.rs
@@ -100,7 +100,7 @@ pub fn resolve(skill: Skill, source: &mut Cryp, target: &mut Cryp, mut resolutio
}
if target.affected(Effect::Hostility) {
- resolutions = hatred(target, source, resolutions, skill, amount);
+ resolutions = hatred(source, target, resolutions, skill, amount);
}
},
Event::Immunity { skill: _, immunity } => match immunity.contains(&Effect::Parry) {
@@ -1343,7 +1343,15 @@ mod tests {
resolve(Skill::Attack, &mut x, &mut y, vec![]);
- assert!(x.affected(Effect::Hatred));
+ assert!(y.affected(Effect::Hatred));
+
+ let mut results = resolve(Skill::Attack, &mut y, &mut x, vec![]);
+
+ let Resolution { source: _, target: _, event } = results.remove(0);
+ match event {
+ Event::Damage { amount, skill: _, mitigation: _, colour: _} => assert_eq!(amount, 512),
+ _ => panic!("not damage hatred"),
+ };
}
#[test]
diff --git a/server/src/vbox.rs b/server/src/vbox.rs
index 5f348b1c..20c6de72 100644
--- a/server/src/vbox.rs
+++ b/server/src/vbox.rs
@@ -406,7 +406,6 @@ pub struct Vbox {
impl Vbox {
pub fn new(account_id: Uuid, instance_id: Uuid) -> Vbox {
- // line them up with the columns of the vbox
let starting_items = vec![
Var::Attack,
Var::Attack,