Merge branch 'master' into return-of-react
This commit is contained in:
commit
0af3ea9d40
@ -153,10 +153,12 @@ class CombatCryps extends Phaser.Scene {
|
||||
this.drawCryps(game);
|
||||
this.registry.events.on('changedata', this.updateData, this);
|
||||
this.registry.set('crypStatusUpdate', false);
|
||||
this.teams = game.teams.length;
|
||||
}
|
||||
|
||||
updateData(parent, key, data) {
|
||||
if (key === 'game' && data) {
|
||||
if (data.teams.length !== this.teams) this.scene.restart(data);
|
||||
const isAnimating = this.phase === 'animating';
|
||||
this.game = data;
|
||||
if (isAnimating) return false;
|
||||
|
||||
@ -72,10 +72,9 @@ class CombatHitBox extends Phaser.Scene {
|
||||
this.game.events.emit('SEND_SKILL', game.id, activeSkill.cryp.id, c.id, activeSkill.skill.skill);
|
||||
}
|
||||
};
|
||||
|
||||
const crypSpawn = group.children.entries.find(s => s.cryp.id === c.id);
|
||||
const team = c.account === account.id ? 0 : 1;
|
||||
this.add.existing(new CrypHitBox(this, crypSpawn.iter, team, cback));
|
||||
if (crypSpawn) this.add.existing(new CrypHitBox(this, crypSpawn.iter, team, cback));
|
||||
});
|
||||
});
|
||||
this.scene.moveBelow('Combat');
|
||||
|
||||
@ -270,7 +270,7 @@ function createSocket(events) {
|
||||
|
||||
if (!account) events.loginPrompt();
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
send({ method: 'account_login', params: { name: 'ntr', password: 'grepgrepgrep' } });
|
||||
// send({ method: 'account_login', params: { name: 'ntr', password: 'grepgrepgrep' } });
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"split:molecules": "cd molecules; csplit -f mol bulk.sdf /\$\$\$\$/ {*} --suppress-matched -z",
|
||||
"split:molecules": "cd molecules; csplit -f mol bulk.sdf /\\$\\$\\$\\$/ {*} --suppress-matched -z",
|
||||
"migrate": "knex migrate:latest",
|
||||
"migrate:make": "knex migrate:make --",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
|
||||
@ -15,6 +15,12 @@
|
||||
|
||||
# WORK WORK
|
||||
## NOW
|
||||
|
||||
fix taunt
|
||||
decay is op
|
||||
siphon might have a prob
|
||||
|
||||
|
||||
cryp vbox
|
||||
update defensives in skill.rs
|
||||
|
||||
|
||||
@ -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];
|
||||
|
||||
@ -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,
|
||||
@ -948,7 +952,7 @@ fn decay(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions) -> Reso
|
||||
}
|
||||
|
||||
fn decay_tick(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions) -> Resolutions {
|
||||
let amount = source.blue_damage();
|
||||
let amount = source.blue_damage() / 2;
|
||||
target.deal_blue_damage(Skill::DecayTick, amount)
|
||||
.into_iter()
|
||||
.for_each(|e| results.push(Resolution::new(source, target).event(e)));
|
||||
|
||||
@ -162,42 +162,42 @@ impl Spec {
|
||||
// Upgrades to HP Spec
|
||||
Spec::Hp => modified + base.pct(5),
|
||||
Spec::LifeI => modified + {
|
||||
let mut mult = 10;
|
||||
let mut mult: u64 = 10;
|
||||
if team_colours.red >= 5 { mult += 20 };
|
||||
if team_colours.red >= 10 { mult += 30 };
|
||||
if team_colours.red >= 20 { mult += 50 };
|
||||
mult * team_colours.green as u64
|
||||
},
|
||||
Spec::RedShieldI => modified + {
|
||||
let mut mult = 10;
|
||||
let mut mult: u64 = 10;
|
||||
if team_colours.red >= 5 { mult += 20 };
|
||||
if team_colours.red >= 10 { mult += 30 };
|
||||
if team_colours.red >= 20 { mult += 50 };
|
||||
mult * team_colours.red as u64
|
||||
},
|
||||
Spec::BlueShieldI => modified + {
|
||||
let mut mult = 10;
|
||||
let mut mult: u64 = 10;
|
||||
if team_colours.red >= 5 { mult += 20 };
|
||||
if team_colours.red >= 10 { mult += 30 };
|
||||
if team_colours.red >= 20 { mult += 50 };
|
||||
(mult * team_colours.blue) as u64
|
||||
mult * team_colours.blue as u64
|
||||
},
|
||||
Spec::LRSI => modified + {
|
||||
let mut mult = 5;
|
||||
let mut mult: u64 = 5;
|
||||
if team_colours.green >= 2 && team_colours.red >= 2 { mult += 5 };
|
||||
if team_colours.green >= 5 && team_colours.red >= 5 { mult += 10 };
|
||||
if team_colours.green >= 10 && team_colours.red >= 10 { mult += 20 };
|
||||
mult * (team_colours.green + team_colours.red) as u64
|
||||
},
|
||||
Spec::LBSI => modified + {
|
||||
let mut mult = 5;
|
||||
let mut mult: u64 = 5;
|
||||
if team_colours.green >= 2 && team_colours.red >= 2 { mult += 5 };
|
||||
if team_colours.green >= 5 && team_colours.red >= 5 { mult += 10 };
|
||||
if team_colours.green >= 10 && team_colours.red >= 10 { mult += 20 };
|
||||
mult * (team_colours.green + team_colours.red) as u64
|
||||
},
|
||||
Spec::RBSI => modified + {
|
||||
let mut mult = 5;
|
||||
let mut mult: u64 = 5;
|
||||
if team_colours.blue >= 2 && team_colours.red >= 2 { mult += 5 };
|
||||
if team_colours.blue >= 5 && team_colours.red >= 5 { mult += 10 };
|
||||
if team_colours.blue >= 10 && team_colours.red >= 10 { mult += 20 };
|
||||
|
||||
@ -202,6 +202,7 @@ impl Var {
|
||||
Var::Silence => Some(Skill::Silence),
|
||||
// Var::Slay => Some(Skill::Slay),
|
||||
Var::Slow => Some(Skill::Slow),
|
||||
Var::Siphon => Some(Skill::Siphon),
|
||||
Var::Snare => Some(Skill::Snare),
|
||||
Var::Strangle => Some(Skill::Strangle),
|
||||
Var::Strike => Some(Skill::Strike),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user