rename sheidl -> life

This commit is contained in:
ntr 2019-04-09 16:02:48 +10:00
parent 81fa77a347
commit db3c8c2d83
13 changed files with 195 additions and 195 deletions

View File

@ -121,7 +121,7 @@ module.exports = {
colours: '2 Blue',
},
Shield: {
Life: {
description: 'grants immunity to magical skills to target cryp',
colours: '1 Green 1 Blue',
},
@ -224,7 +224,7 @@ module.exports = {
thresholds: [2, 5, 10],
},
Hp: {
GreenLife: {
description: 'Increases life',
upgrades: 'combine with 2 red / blue / green',
},
@ -235,32 +235,32 @@ module.exports = {
thresholds: [5, 10, 20],
},
RedShieldI: {
description: 'Increased red shield',
RedLifeI: {
description: 'Increased red Life',
colours: ['red'],
thresholds: [5, 10, 20],
},
BlueShieldI: {
description: 'Increased blue shield',
BlueLifeI: {
description: 'Increased blue Life',
colours: ['blue'],
thresholds: [5, 10, 20],
},
LRSI: {
description: 'Increased life and red shield',
description: 'Increased life and red Life',
colours: ['green', 'red'],
thresholds: [2, 5, 10],
},
LBSI: {
description: 'Increased life and blue shield',
description: 'Increased life and blue Life',
colours: ['green', 'blue'],
thresholds: [2, 5, 10],
},
RBSI: {
description: 'Increased red and blue shield',
description: 'Increased red and blue Life',
colours: ['red', 'blue'],
thresholds: [2, 5, 10],
},

View File

@ -91,7 +91,7 @@ function GamePanel(props) {
}
function Skill(cryp, i, mobile) {
const ko = cryp.hp.value === 0 ? 'ko' : '';
const ko = cryp.green_life.value === 0 ? 'ko' : '';
const s = cryp.skills[i];
if (!s) {
@ -135,11 +135,11 @@ function GamePanel(props) {
}
function Cryp(cryp) {
const ko = cryp.hp.value === 0 ? 'ko' : '';
const ko = cryp.green_life.value === 0 ? 'ko' : '';
const skills = range(0, 3).map(i => Skill(cryp, i));
const stats = [STATS.hp, STATS.redShield, STATS.blueShield].map((s, j) => (
const stats = [STATS.green_life, STATS.redShield, STATS.blueShield].map((s, j) => (
<figure key={j} alt={s.stat}>
{s.svg(`stat-icon ${s.colour}`)}
<figcaption>{cryp[s.stat].value} / {cryp[s.stat].max}</figcaption>
@ -187,7 +187,7 @@ function GamePanel(props) {
}
function OpponentCryp(cryp, i) {
const stats = [STATS.hp, STATS.redShield, STATS.blueShield].map((s, j) => (
const stats = [STATS.green_life, STATS.redShield, STATS.blueShield].map((s, j) => (
<figure key={j} alt={s.stat}>
{s.svg(`stat-icon ${s.colour}`)}
<figcaption>{cryp[s.stat].value} / {cryp[s.stat].max}</figcaption>

View File

@ -55,23 +55,23 @@ function requestAvatar(name) {
const NULL_UUID = '00000000-0000-0000-0000-000000000000';
const STATS = {
speed: { stat: 'speed', colour: '', svg: shapes.triangle },
speed: { stat: 'speed', colour: 'white', svg: shapes.triangle },
redDamage: { stat: 'red_damage', colour: 'red', svg: shapes.circle },
greenDamage: { stat: 'green_damage', colour: 'green', svg: shapes.circle },
blueDamage: { stat: 'blue_damage', colour: 'blue', svg: shapes.circle },
redShield: { stat: 'red_shield', colour: 'red', svg: shapes.square },
hp: { stat: 'hp', colour: 'green', svg: shapes.square },
blueShield: { stat: 'blue_shield', colour: 'blue', svg: shapes.square },
redLife: { stat: 'red_life', colour: 'red', svg: shapes.square },
greenLife: { stat: 'green_life', colour: 'green', svg: shapes.square },
blueLife: { stat: 'blue_life', colour: 'blue', svg: shapes.square },
};
const SPECS = {
Hp: { colour: 'white', caption: 'Hp', svg: shapes.square },
RedShieldI: { colour: 'red', caption: 'HpI', svg: shapes.square },
BlueShieldI: { colour: 'blue', caption: 'HpI', svg: shapes.square },
LifeI: { colour: 'green', caption: 'HpI', svg: shapes.square },
LRSI: { colour: 'yellow', caption: 'HpI', svg: shapes.square },
LBSI: { colour: 'cyan', caption: 'HpI', svg: shapes.square },
RBSI: { colour: 'purple', caption: 'HpI', svg: shapes.square },
GreenLife: { colour: 'green', caption: 'Life', svg: shapes.square },
RedLifeI: { colour: 'red', caption: 'Life', svg: shapes.square },
BlueLifeI: { colour: 'blue', caption: 'Life', svg: shapes.square },
LifeI: { colour: 'green', caption: 'Life', svg: shapes.square },
LRSI: { colour: 'yellow', caption: 'Life', svg: shapes.square },
LBSI: { colour: 'cyan', caption: 'Life', svg: shapes.square },
RBSI: { colour: 'purple', caption: 'Life', svg: shapes.square },
Damage: { colour: 'white', caption: 'Damage', svg: shapes.circle },
RedDamageI: { colour: 'red', caption: 'DamageI', svg: shapes.circle },
@ -82,12 +82,12 @@ const SPECS = {
RBDI: { colour: 'purple', caption: 'DamageI', svg: shapes.circle },
Speed: { colour: 'white', caption: 'Speed', svg: shapes.diamond },
RedSpeed: { colour: 'red', caption: 'SpeedI', svg: shapes.diamond },
BlueSpeedI: { colour: 'blue', caption: 'SpeedI', svg: shapes.diamond },
GreenSpeedI: { colour: 'green', caption: 'speed', svg: shapes.diamond },
GRSpeedI: { colour: 'yellow', caption: 'SpeedI', svg: shapes.diamond },
GBSpeedI: { colour: 'cyan', caption: 'SpeedI', svg: shapes.diamond },
RBSpeedI: { colour: 'purple', caption: 'SpeedI', svg: shapes.diamond },
RedSpeed: { colour: 'red', caption: 'Speed', svg: shapes.diamond },
BlueSpeedI: { colour: 'blue', caption: 'Speed', svg: shapes.diamond },
GreenSpeedI: { colour: 'green', caption: 'Speed', svg: shapes.diamond },
GRSpeedI: { colour: 'yellow', caption: 'Speed', svg: shapes.diamond },
GBSpeedI: { colour: 'cyan', caption: 'Speed', svg: shapes.diamond },
RBSpeedI: { colour: 'purple', caption: 'Speed', svg: shapes.diamond },
};

View File

@ -67,7 +67,7 @@ Blast - (Attack BB) Deal significant `Blue` damage
Ruin - (Stun BB) - AOE stun on the enemy team for remaind of turn
Amplify - (Buff BB) Increased blue damage dealt by target ally
Curse - (Debuff BB) Decrease damage dealt by target enemy
Plague Shield - (Block BB) Apply dot debuff to attackers
Plague Life - (Block BB) Apply dot debuff to attackers
# Non-Violence Type (green) #
@ -92,7 +92,7 @@ Silence - (Stun + 2G + 1R) - enemy can't use blue skills for 3 turns
Purify - (Buff + 2G + 1R) - remove all debuffs from target
Empower - (Buff + 1G + 1R) - Increased red damage dealt by target ally
???? - (Debuff RB) - ???
Shield - (Block + 2G + 1R) - Take no blue damage for the next 3 turns
Life - (Block + 2G + 1R) - Take no blue damage for the next 3 turns
# Technology Type (green / blue) type - ??? maybe rework and rename #

View File

@ -3,11 +3,11 @@
### Defenses ###
Rare `Increased Hp`
Rare `Increased GreenLife`
Common `Increased Evasion rating`
Common `Increased Blue Shield rating`
Common `Increased RedShield rating`
Common `Increased Blue Life rating`
Common `Increased RedLife rating`
Common `Increased Healing done`
Common `Increased Healing received`
Common `Increased Blue Damage`
@ -15,7 +15,7 @@ Common `Increased Red Damage`
Uncommon `Reduced hp loss penalty to evade chance`
Uncommon `Increased base evasion chance per X evasion rating`
Uncommon `Increased % mitigation from red_shield`
Uncommon `Increased % mitigation from red_life`
Uncommon `Increased % mitigation from spell shield`
Uncommon `Increased damage over time`

View File

@ -85,7 +85,7 @@ In your team Cryp #1 has `Strike`, Cryp #2 has `Slay` and `Heal`, Cryp #3 has `S
### Generic Specs
# Basic % Hp
# Basic % GreenLife
`Base` -> 5% inc hp
`Team Bonus` -> 3 basic gems -> +5% // 6 basic gems -> +10% // 12 basic gems -> +15%
Maximum 35% inc hp
@ -139,41 +139,41 @@ Add 1 blue and 1 green gem
`Team Bonus` (2B + 2G gems) -> +5% + 5% // (5B + 5G gems) -> +10% + 10% % // (10B + 10G) gems -> +15% + 15%
Maximum +35% inc blue damage and 35% inc healing
### Increased Hp Combos ###
### Increased GreenLife Combos ###
Generate by combining `Generic Spec (Basic Hp)` with respective RGB
Generate by combining `Generic Spec (Basic GreenLife)` with respective RGB
# Increased % Red Shield (Basic %HP + 2R)
# Increased % Red Life (Basic %HP + 2R)
Add 2 `red gems`
`Base` -> 10% inc red shield
`Team Bonus` 5 red gems -> +10% // 10 red gems -> +15% // 20 red gems -> +20%
Maximum +55% inc red shield
# Increased % Red Shield and Hp (Basic %HP + 1R1G)
# Increased % Red Life and GreenLife (Basic %HP + 1R1G)
Add 1 red 1 green gem
`Base` -> 5% inc red shield and 5% inc hp
`Team Bonus` (2R + 2G gems) -> +5% + 5% // (5R + 5G gems) -> +10% + 10% % // (10R + 10G) gems -> +15% + 15%
Maximum +35% inc red shield and 35% inc hp
# Increased % Blue Shield (Basic %HP + 2B)
# Increased % Blue Life (Basic %HP + 2B)
Add 2 `blue gems`
`Base` -> 10% inc red shield
`Team Bonus` 5 blue gems -> +10% // 10 blue gems -> +15% // 20 blue gems -> +20%
Maximum +55% inc blue shield
# Increased % Blue Shield and Hp (Basic %HP + 1B1G)
# Increased % Blue Life and GreenLife (Basic %HP + 1B1G)
Add `1 blue and 1 green gems`
`Base` -> 5% inc red shield and 5% inc hp
`Team Bonus` (2B + 2G gems) -> +5% + 5% // (5B + 5G gems) -> +10% + 10% % // (10B + 10G) gems -> +15% + 15%
Maximum +35% inc blue shield and 35% inc hp
# Increased % Hp (Basic %HP + 2G)
# Increased % GreenLife (Basic %HP + 2G)
Add `2 green gems`
`Base` -> 10% inc hp
`Team Bonus` 5 green gems -> +10% // 10 green gems -> +15% // 20 green gems -> +20%
Maximum +55% inc hp
# Increased % Blue and Red Shield (Basic %HP + 1B1R)
# Increased % Blue and Red Life (Basic %HP + 1B1R)
Add `1 blue and 1 red gem`
`Base` -> 5% inc red shield and 5% inc hp
`Team Bonus` (2B + 2R gems) -> +5% + 5% // (5B + 5R gems) -> +10% + 10% % // (10B + 10R) gems -> +15% + 15%

View File

@ -3,7 +3,7 @@
* phys is faster and chaotic
* spells are slow and reliable
* defensives are implicit
* red_shield is restored, not gained
* red_life is restored, not gained
* players can feel aggressive
- build archtypes

View File

@ -95,7 +95,7 @@ pub enum Stat {
Str,
Agi,
Int,
Hp,
GreenLife,
Speed,
RedDamage,
RedDamageTaken,
@ -103,8 +103,8 @@ pub enum Stat {
BlueDamageTaken,
GreenDamage,
GreenDamageTaken,
RedShield,
BlueShield,
RedLife,
BlueLife,
Evasion,
}
@ -173,12 +173,12 @@ pub struct Cryp {
pub id: Uuid,
pub account: Uuid,
pub red_damage: CrypStat,
pub red_shield: CrypStat,
pub blue_shield: CrypStat,
pub red_life: CrypStat,
pub blue_life: CrypStat,
pub blue_damage: CrypStat,
pub green_damage: CrypStat,
pub speed: CrypStat,
pub hp: CrypStat,
pub green_life: CrypStat,
pub evasion: CrypStat,
pub skills: Vec<CrypSkill>,
pub effects: Vec<CrypEffect>,
@ -194,11 +194,11 @@ impl Cryp {
id,
account: id,
red_damage: CrypStat { base: 256, value: 256, max: 256, stat: Stat::RedDamage },
red_shield: CrypStat { base: 0, value: 0, max: 0, stat: Stat::RedShield },
red_life: CrypStat { base: 0, value: 0, max: 0, stat: Stat::RedLife },
blue_damage: CrypStat { base: 256, value: 256, max: 256, stat: Stat::BlueDamage },
blue_shield: CrypStat { base: 0, value: 0, max: 0, stat: Stat::BlueShield },
blue_life: CrypStat { base: 0, value: 0, max: 0, stat: Stat::BlueLife },
green_damage: CrypStat { base: 256, value: 256, max: 256, stat: Stat::GreenDamage },
hp: CrypStat { base: 1024, value: 1024, max: 1024, stat: Stat::Hp },
green_life: CrypStat { base: 1024, value: 1024, max: 1024, stat: Stat::GreenLife },
speed: CrypStat { base: 128, value: 128, max: 128, stat: Stat::Speed },
evasion: CrypStat { base: 0, value: 0, max: 0, stat: Stat::Evasion },
skills: vec![],
@ -263,19 +263,19 @@ impl Cryp {
self.specs.sort_unstable();
self.red_damage.recalculate(&self.specs, team_colours);
self.red_shield.recalculate(&self.specs, team_colours);
self.red_life.recalculate(&self.specs, team_colours);
self.blue_damage.recalculate(&self.specs, team_colours);
self.blue_shield.recalculate(&self.specs, team_colours);
self.blue_life.recalculate(&self.specs, team_colours);
self.evasion.recalculate(&self.specs, team_colours);
self.speed.recalculate(&self.specs, team_colours);
self.green_damage.recalculate(&self.specs, team_colours);
self.hp.recalculate(&self.specs, team_colours);
self.green_life.recalculate(&self.specs, team_colours);
self
}
pub fn is_ko(&self) -> bool {
self.hp.value == 0
self.green_life.value == 0
}
pub fn immune(&self, skill: Skill) -> Option<Immunity> {
@ -453,14 +453,14 @@ impl Cryp {
return modified_speed;
}
pub fn hp(&self) -> u64 {
self.hp.value
pub fn green_life(&self) -> u64 {
self.green_life.value
}
fn reduce_hp(&mut self, amount: u64) {
self.hp.reduce(amount);
if self.affected(Effect::Clutch) && self.hp() == 0 {
self.hp.value = 1;
fn reduce_green_life(&mut self, amount: u64) {
self.green_life.reduce(amount);
if self.affected(Effect::Clutch) && self.green_life() == 0 {
self.green_life.value = 1;
}
}
@ -473,11 +473,11 @@ impl Cryp {
};
}
let red = self.red_shield.max.saturating_sub(self.red_shield.value);
self.red_shield.value = self.red_shield.max;
let red = self.red_life.max.saturating_sub(self.red_life.value);
self.red_life.value = self.red_life.max;
let blue = self.blue_shield.max.saturating_sub(self.blue_shield.value);
self.blue_shield.value = self.blue_shield.max;
let blue = self.blue_life.max.saturating_sub(self.blue_life.value);
self.blue_life.value = self.blue_life.max;
Event::Recharge { red, blue, skill }
}
@ -502,11 +502,11 @@ impl Cryp {
match self.affected(Effect::Invert) {
false => {
let current_hp = self.hp();
self.hp.increase(modified_damage);
let new_hp = self.hp.value;
let current_green_life = self.green_life();
self.green_life.increase(modified_damage);
let new_green_life = self.green_life.value;
let healing = new_hp - current_hp;
let healing = new_green_life - current_green_life;
let overhealing = modified_damage - healing;
events.push(Event::Healing {
@ -519,9 +519,9 @@ impl Cryp {
events.push(Event::Inversion { skill });
// there is no green shield (yet)
let current_hp = self.hp();
self.reduce_hp(modified_damage);
let delta = current_hp - self.hp();
let current_green_life = self.green_life();
self.reduce_green_life(modified_damage);
let delta = current_green_life - self.green_life();
events.push(Event::Damage {
skill,
@ -556,20 +556,20 @@ impl Cryp {
match self.affected(Effect::Invert) {
false => {
// calculate amount of damage red_shield will not absorb
// eg 50 red_shield 25 damage -> 0 remainder 25 mitigation
// 50 red_shield 100 damage -> 50 remainder 50 mitigation
// 50 red_shield 5 damage -> 0 remainder 5 mitigation
let remainder = modified_damage.saturating_sub(self.red_shield.value);
// calculate amount of damage red_life will not absorb
// eg 50 red_life 25 damage -> 0 remainder 25 mitigation
// 50 red_life 100 damage -> 50 remainder 50 mitigation
// 50 red_life 5 damage -> 0 remainder 5 mitigation
let remainder = modified_damage.saturating_sub(self.red_life.value);
let mitigation = modified_damage.saturating_sub(remainder);
// reduce red_shield by mitigation amount
self.red_shield.reduce(mitigation);
// reduce red_life by mitigation amount
self.red_life.reduce(mitigation);
// deal remainder to hp
let current_hp = self.hp();
self.reduce_hp(remainder);
let delta = current_hp - self.hp();
// deal remainder to green_life
let current_green_life = self.green_life();
self.reduce_green_life(remainder);
let delta = current_green_life - self.green_life();
events.push(Event::Damage {
skill,
@ -581,15 +581,15 @@ impl Cryp {
true => {
events.push(Event::Inversion { skill });
let current_hp = self.hp();
self.hp.increase(modified_damage);
let new_hp = self.hp.value;
let healing = new_hp - current_hp;
let current_green_life = self.green_life();
self.green_life.increase(modified_damage);
let new_green_life = self.green_life.value;
let healing = new_green_life - current_green_life;
let overhealing = modified_damage - healing;
let current_shield = self.red_shield.value;
self.red_shield.increase(overhealing);
let recharge = self.red_shield.value - current_shield;
let current_life = self.red_life.value;
self.red_life.increase(overhealing);
let recharge = self.red_life.value - current_life;
if healing > 0 {
events.push(Event::Healing {
@ -629,16 +629,16 @@ impl Cryp {
match self.affected(Effect::Invert) {
false => {
let remainder = modified_damage.saturating_sub(self.blue_shield.value);
let remainder = modified_damage.saturating_sub(self.blue_life.value);
let mitigation = modified_damage.saturating_sub(remainder);
// reduce blue_shield by mitigation amount
self.blue_shield.reduce(mitigation);
// reduce blue_life by mitigation amount
self.blue_life.reduce(mitigation);
// deal remainder to hp
let current_hp = self.hp();
self.reduce_hp(remainder);
let delta = current_hp - self.hp();
// deal remainder to green_life
let current_green_life = self.green_life();
self.reduce_green_life(remainder);
let delta = current_green_life - self.green_life();
events.push(Event::Damage {
skill,
@ -650,15 +650,15 @@ impl Cryp {
true => {
events.push(Event::Inversion { skill });
let current_hp = self.hp();
self.hp.increase(modified_damage);
let new_hp = self.hp.value;
let healing = new_hp - current_hp;
let current_green_life = self.green_life();
self.green_life.increase(modified_damage);
let new_green_life = self.green_life.value;
let healing = new_green_life - current_green_life;
let overhealing = modified_damage - healing;
let current_shield = self.blue_shield.value;
self.blue_shield.increase(overhealing);
let recharge = self.blue_shield.value - current_shield;
let current_life = self.blue_life.value;
self.blue_life.increase(overhealing);
let recharge = self.blue_life.value - current_life;
if healing > 0 {
events.push(Event::Healing {
@ -704,8 +704,8 @@ impl Cryp {
}
let mut rng = thread_rng();
let hp_pct = (self.hp.value * 100) / self.hp.value;
let evasion_rating = (self.evasion.value * hp_pct) / 100;
let green_life_pct = (self.green_life.value * 100) / self.green_life.value;
let evasion_rating = (self.evasion.value * green_life_pct) / 100;
let roll = rng.gen_range(0, 100);
println!("{:} < {:?}", roll, evasion_rating);
@ -817,7 +817,7 @@ mod tests {
cryp.spec_add(Spec::LifeI).unwrap();
cryp.spec_add(Spec::RedDamageI).unwrap();
cryp.spec_add(Spec::RedDamageI).unwrap();
cryp.spec_add(Spec::BlueShieldI).unwrap();
cryp.spec_add(Spec::BlueLifeI).unwrap();
assert_eq!(cryp.colours.red, 6);
assert_eq!(cryp.colours.green, 2);
@ -843,9 +843,9 @@ mod tests {
cryp.apply_modifiers(&team_colours);
assert!(cryp.red_damage.value == cryp.red_damage.base + cryp.red_damage.base.pct(10));
assert!(cryp.green_damage.value == cryp.green_damage.base + cryp.green_damage.base.pct(20));
assert!(cryp.blue_damage.value == cryp.blue_damage.base + cryp.blue_damage.base.pct(65));
assert!(cryp.red_damage.value == cryp.red_damage.base + cryp.red_damage.base.pct(20));
assert!(cryp.green_damage.value == cryp.green_damage.base + cryp.green_damage.base.pct(40));
assert!(cryp.blue_damage.value == cryp.blue_damage.base + cryp.blue_damage.base.pct(80));
return;
}

View File

@ -1062,7 +1062,7 @@ mod tests {
// just in case
// remove all mitigation
game.team_by_id(x_team.id).cryp_by_id(x_cryp.id).unwrap().red_shield.force(0);
game.team_by_id(x_team.id).cryp_by_id(x_cryp.id).unwrap().red_life.force(0);
let _x_stun_id = game.add_skill(x_team.id, x_cryp.id, Some(y_cryp.id), Skill::TestStun).unwrap();
game.add_skill(y_team.id, y_cryp.id, Some(x_cryp.id), Skill::Attack).unwrap();
@ -1129,7 +1129,7 @@ mod tests {
// should not be stunned because of parry
assert!(game.team_by_id(x_team.id).cryps[0].is_stunned() == false);
// riposte
assert!(game.team_by_id(y_team.id).cryps[0].hp() == 768);
assert!(game.team_by_id(y_team.id).cryps[0].green_life() == 768);
}
#[test]
@ -1237,7 +1237,7 @@ mod tests {
assert!([Phase::Skill, Phase::Finish].contains(&game.phase));
// kill a cryp
game.team_by_id(i_team.id).cryp_by_id(i_cryp.id).unwrap().hp.reduce(u64::max_value());
game.team_by_id(i_team.id).cryp_by_id(i_cryp.id).unwrap().green_life.reduce(u64::max_value());
assert!(game.team_by_id(i_team.id).skills_required() == 1);
assert!(game.team_by_id(x_team.id).skills_required() == 2);

View File

@ -20,15 +20,15 @@ pub enum ItemAction {
RerollRedDamage,
RerollBlueDamage,
RerollSpeed,
RerollHp,
RerollRedShield,
RerollBlueShield,
RerollGreenLife,
RerollRedLife,
RerollBlueLife,
RerollEvasion,
SpecRedDamage5,
SpecBlueDamage5,
SpecRedShield5,
SpecBlueShield5,
SpecRedLife5,
SpecBlueLife5,
SpecBlueEvasion5,
}
@ -52,12 +52,12 @@ impl Item {
fn apply(&mut self, tx: &mut Transaction, target: Uuid) -> Result<(), Error> {
match self.action {
ItemAction::RerollHp => reroll(self, tx, target, Stat::Hp),
ItemAction::RerollGreenLife => reroll(self, tx, target, Stat::GreenLife),
ItemAction::RerollRedDamage => reroll(self, tx, target, Stat::RedDamage),
ItemAction::RerollBlueDamage => reroll(self, tx, target, Stat::BlueDamage),
ItemAction::RerollSpeed => reroll(self, tx, target, Stat::Speed),
ItemAction::RerollRedShield => reroll(self, tx, target, Stat::RedShield),
ItemAction::RerollBlueShield => reroll(self, tx, target, Stat::BlueShield),
ItemAction::RerollRedLife => reroll(self, tx, target, Stat::RedLife),
ItemAction::RerollBlueLife => reroll(self, tx, target, Stat::BlueLife),
ItemAction::RerollEvasion => reroll(self, tx, target, Stat::Evasion),
ItemAction::SpecRedDamage5 => spec_add(self, tx, target, SpecType::RedDamage5),
@ -85,7 +85,7 @@ fn reroll(item: &mut Item, tx: &mut Transaction, target: Uuid, stat: Stat) -> Re
fn mode_drops(mode: GameMode) -> Vec<(ItemAction, usize)> {
match mode {
GameMode::Normal => vec![
(ItemAction::RerollHp, 1),
(ItemAction::RerollGreenLife, 1),
(ItemAction::RerollRedDamage, 1),
(ItemAction::RerollBlueDamage, 1),
],
@ -96,19 +96,19 @@ fn mode_drops(mode: GameMode) -> Vec<(ItemAction, usize)> {
GameMode::Zone2v2Caster |
GameMode::Zone3v3MeleeMiniboss => vec![
(ItemAction::RerollEvasion, 1),
(ItemAction::RerollRedShield, 1),
(ItemAction::RerollBlueShield, 1),
(ItemAction::RerollRedLife, 1),
(ItemAction::RerollBlueLife, 1),
],
GameMode::Zone3v3HealerBoss => vec![
(ItemAction::RerollSpeed, 1),
],
// _ => vec![
// (ItemAction::RerollHp, 1),
// (ItemAction::RerollGreenLife, 1),
// (ItemAction::RerollRedDamage, 1),
// (ItemAction::RerollBlueDamage, 1),
// (ItemAction::RerollSpeed, 1),
// (ItemAction::RerollRedShield, 1),
// (ItemAction::RerollBlueShield, 1),
// (ItemAction::RerollRedLife, 1),
// (ItemAction::RerollBlueLife, 1),
// (ItemAction::RerollEvasion, 1),
// ],
}

View File

@ -63,7 +63,7 @@ pub fn resolve(skill: Skill, source: &mut Cryp, target: &mut Cryp, mut resolutio
Skill::Reflect => reflect(source, target, resolutions),
Skill::Riposte => panic!("riposte should not be caste"),
Skill::Ruin => ruin(source, target, resolutions),
Skill::Shield => shield(source, target, resolutions), // target is immune to magic damage and fx
Skill::Life => shield(source, target, resolutions), // target is immune to magic damage and fx
Skill::Silence => silence(source, target, resolutions), // target cannot cast spells
Skill::Siphon => siphon(source, target, resolutions),
Skill::SiphonTick => siphon_tick(source, target, resolutions), // hot
@ -261,7 +261,7 @@ pub enum Effect {
Hatred,
// magic immunity
Shield,
Life,
// effects over time
Triage,
@ -283,7 +283,7 @@ impl Effect {
Category::Red => true,
_ => false,
},
Effect::Shield => match skill.category() {
Effect::Life => match skill.category() {
Category::Blue => true,
Category::Red => false,
_ => false,
@ -416,7 +416,7 @@ impl Effect {
Effect::Hostility => Category::BlueBuff,
// magic immunity
Effect::Shield => Category::BlueBuff,
Effect::Life => Category::BlueBuff,
Effect::Invert => Category::GreenBuff,
// effects over time
@ -470,7 +470,7 @@ impl Effect {
Effect::Corrupt => 2,
Effect::Corruption => 3,
Effect::Shield => 2,
Effect::Life => 2,
Effect::Triage => 3,
Effect::Decay => 3,
@ -564,7 +564,7 @@ pub enum Skill {
// Purity
// -----------------
Empower,
Shield,
Life,
Silence,
Purify,
Purge,
@ -608,7 +608,7 @@ impl Skill {
Skill::SiphonTick => None,
Skill::Curse => Some(1),
Skill::Empower => Some(1),
Skill::Shield => None,
Skill::Life => None,
Skill::Silence => Some(1),
Skill::Purify => None,
Skill::Purge => None,
@ -663,7 +663,7 @@ impl Skill {
Skill::TriageTick => Category::GreenTick, // hot
Skill::Throw => Category::Green,
Skill::Empower => Category::Green,
Skill::Shield => Category::Green,
Skill::Life => Category::Green,
Skill::Purify => Category::Green,
Skill::Recharge => Category::Green,
Skill::Reflect => Category::Green,
@ -1063,8 +1063,8 @@ fn siphon_tick(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions) -
}
fn shield(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions) -> Resolutions {
let shield = CrypEffect::new(Effect::Shield);
results.push(Resolution::new(source, target).event(target.add_effect(Skill::Shield, shield)));
let shield = CrypEffect::new(Effect::Life);
results.push(Resolution::new(source, target).event(target.add_effect(Skill::Life, shield)));
return results;
}
@ -1135,7 +1135,7 @@ mod tests {
y.reduce_effect_durations();
let _decay = y.effects.iter().find(|e| e.effect == Effect::Decay);
// assert!(y.hp() == y.hp().saturating_sub(decay.unwrap().tick.unwrap().amount));
// assert!(y.green_life() == y.green_life().saturating_sub(decay.unwrap().tick.unwrap().amount));
}
#[test]
@ -1148,7 +1148,7 @@ mod tests {
// ensure it doesn't have 0 pd
x.red_damage.force(100);
y.hp.force(500);
y.green_life.force(500);
block(&mut y.clone(), &mut y, vec![]);
assert!(y.effects.iter().any(|e| e.effect == Effect::Block));
@ -1176,7 +1176,7 @@ mod tests {
assert!(y.affected(Effect::Clutch));
let mut results = attack(&mut x, &mut y, vec![]);
assert!(y.hp() == 1);
assert!(y.green_life() == 1);
let Resolution { source: _, target: _, event } = results.remove(0);
match event {
@ -1207,8 +1207,8 @@ mod tests {
.named(&"camel".to_string());
// give red shield but reduce to 0
y.red_shield.force(64);
y.red_shield.reduce(64);
y.red_life.force(64);
y.red_life.reduce(64);
x.red_damage.force(256 + 64);
invert(&mut y.clone(), &mut y, vec![]);
@ -1216,11 +1216,11 @@ mod tests {
// heal should deal green damage
heal(&mut x, &mut y, vec![]);
assert!(y.hp() == 768);
assert!(y.green_life() == 768);
// attack should heal and recharge red shield
let mut results = attack(&mut x, &mut y, vec![]);
assert!(y.hp() == 1024);
assert!(y.green_life() == 1024);
match results.remove(0).event {
Event::Inversion { skill } => assert_eq!(skill, Skill::Attack),
@ -1252,7 +1252,7 @@ mod tests {
let mut results = vec![];
results = resolve(Skill::Attack, &mut x, &mut y, results);
assert!(x.hp() == 768);
assert!(x.green_life() == 768);
let Resolution { source: _, target: _, event } = results.remove(0);
match event {
@ -1275,12 +1275,12 @@ mod tests {
let mut y = Cryp::new()
.named(&"camel".to_string());
x.hp.reduce(512);
x.green_life.reduce(512);
let mut results = resolve(Skill::Siphon, &mut x, &mut y, vec![]);
assert!(y.affected(Effect::Siphon));
assert!(x.hp() == 768);
assert!(x.green_life() == 768);
let Resolution { source: _, target: _, event } = results.remove(0);
match event {
@ -1347,16 +1347,16 @@ mod tests {
x.blue_damage.force(50);
// remove all mitigation
y.red_shield.force(0);
y.blue_shield.force(0);
y.red_life.force(0);
y.blue_life.force(0);
y.deal_red_damage(Skill::Attack, 5);
let prev_hp = y.hp();
let prev_hp = y.green_life();
triage(&mut x, &mut y, vec![]);
assert!(y.effects.iter().any(|e| e.effect == Effect::Triage));
assert!(y.hp() > prev_hp);
assert!(y.green_life() > prev_hp);
}
#[test]
@ -1367,8 +1367,8 @@ mod tests {
let mut y = Cryp::new()
.named(&"pretaliation".to_string());
y.red_shield.force(50);
y.blue_shield.force(50);
y.red_life.force(50);
y.blue_life.force(50);
y.deal_red_damage(Skill::Attack, 5);
y.deal_blue_damage(Skill::Blast, 5);
@ -1485,7 +1485,7 @@ mod tests {
// // -----------------
// Empower,
// Slay,
// Shield,
// Life,
// Silence,
// Inquiry,
// Purify,

View File

@ -9,12 +9,12 @@ pub enum Spec {
GRSpeedI,
GBSpeedI,
RBSpeedI,
// Pure redShield has to come first as it applies the base amount
// Pure redLife has to come first as it applies the base amount
// that is multiplied
Hp,
GreenLife,
LifeI,
RedShieldI,
BlueShieldI,
RedLifeI,
BlueLifeI,
LRSI,
LBSI,
RBSI,
@ -57,13 +57,13 @@ impl Spec {
Spec::GBSpeedI => vec![Stat::Speed],
Spec::RBSpeedI => vec![Stat::Speed],
Spec::Hp => vec![Stat::Hp],
Spec::RedShieldI => vec![Stat::RedShield],
Spec::BlueShieldI => vec![Stat::BlueShield],
Spec::LifeI => vec![Stat::Hp],
Spec::LRSI => vec![Stat::Hp, Stat::RedShield],
Spec::LBSI => vec![Stat::Hp, Stat::BlueShield],
Spec::RBSI => vec![Stat::BlueShield, Stat::RedShield],
Spec::GreenLife => vec![Stat::GreenLife],
Spec::RedLifeI => vec![Stat::RedLife],
Spec::BlueLifeI => vec![Stat::BlueLife],
Spec::LifeI => vec![Stat::GreenLife],
Spec::LRSI => vec![Stat::GreenLife, Stat::RedLife],
Spec::LBSI => vec![Stat::GreenLife, Stat::BlueLife],
Spec::RBSI => vec![Stat::BlueLife, Stat::RedLife],
}
}
@ -160,7 +160,7 @@ impl Spec {
},
// Upgrades to HP Spec
Spec::Hp => modified + base.pct(5),
Spec::GreenLife => modified + base.pct(5),
Spec::LifeI => modified + {
let mut mult: u64 = 15;
if team_colours.red >= 5 { mult += 25 };
@ -168,14 +168,14 @@ impl Spec {
if team_colours.red >= 20 { mult += 75 };
mult * team_colours.green as u64
},
Spec::RedShieldI => modified + {
Spec::RedLifeI => modified + {
let mut mult: u64 = 15;
if team_colours.red >= 5 { mult += 25 };
if team_colours.red >= 10 { mult += 50 };
if team_colours.red >= 20 { mult += 75 };
mult * team_colours.red as u64
},
Spec::BlueShieldI => modified + {
Spec::BlueLifeI => modified + {
let mut mult: u64 = 15;
if team_colours.red >= 5 { mult += 25 };
if team_colours.red >= 10 { mult += 50 };

View File

@ -35,13 +35,13 @@ pub enum Var {
// specs
// Base
Damage,
Hp,
GreenLife,
Speed,
// Shields Upgrades
// Lifes Upgrades
LifeI,
RedShieldI,
BlueShieldI,
RedLifeI,
BlueLifeI,
LRSI,
LBSI,
RBSI,
@ -79,7 +79,7 @@ pub enum Var {
Reflect,
Recharge,
Ruin,
Shield,
Life,
Silence,
Slay,
Slow,
@ -134,7 +134,7 @@ impl Var {
Var::Stun => 2,
Var::Damage => 3,
Var::Hp => 3,
Var::GreenLife => 3,
Var::Speed => 3,
_ => {
@ -198,7 +198,7 @@ impl Var {
Var::Recharge => Some(Skill::Recharge),
Var::Reflect => Some(Skill::Reflect),
Var::Ruin => Some(Skill::Ruin),
Var::Shield => Some(Skill::Shield),
Var::Life => Some(Skill::Life),
Var::Silence => Some(Skill::Silence),
// Var::Slay => Some(Skill::Slay),
Var::Slow => Some(Skill::Slow),
@ -233,13 +233,13 @@ impl Var {
Var::GBDI => Some(Spec::GBDI),
Var::RBDI => Some(Spec::RBDI),
Var::Hp => Some(Spec::Hp),
Var::GreenLife => Some(Spec::GreenLife),
Var::LifeI => Some(Spec::LifeI),
Var::LRSI => Some(Spec::LRSI),
Var::LBSI => Some(Spec::LBSI),
Var::RBSI => Some(Spec::RBSI),
Var::RedShieldI => Some(Spec::RedShieldI),
Var::BlueShieldI => Some(Spec::BlueShieldI),
Var::RedLifeI => Some(Spec::RedLifeI),
Var::BlueLifeI => Some(Spec::BlueLifeI),
_ => None,
}
@ -268,7 +268,7 @@ impl From<Skill> for Var {
Skill::Recharge => Var::Recharge,
Skill::Reflect => Var::Reflect,
Skill::Ruin => Var::Ruin,
Skill::Shield => Var::Shield,
Skill::Life => Var::Life,
Skill::Silence => Var::Silence,
Skill::Siphon => Var::Siphon,
Skill::Slow => Var::Slow,
@ -310,13 +310,13 @@ impl From<Spec> for Var {
Spec::GBDI => Var::GBDI,
Spec::RBDI => Var::RBDI,
Spec::Hp => Var::Hp,
Spec::GreenLife => Var::GreenLife,
Spec::LifeI => Var::LifeI,
Spec::LRSI => Var::LRSI,
Spec::LBSI => Var::LBSI,
Spec::RBSI => Var::RBSI,
Spec::RedShieldI => Var::RedShieldI,
Spec::BlueShieldI => Var::BlueShieldI,
Spec::RedLifeI => Var::RedLifeI,
Spec::BlueLifeI => Var::BlueLifeI,
// _ => panic!("{:?} not implemented as a var", spec),
}
}
@ -348,7 +348,7 @@ fn get_combos() -> Vec<Combo> {
Combo { units: vec![Var::Block, Var::Green, Var::Green], var: Var::Reflect },
Combo { units: vec![Var::Block, Var::Blue, Var::Blue], var: Var::Corrupt },
Combo { units: vec![Var::Block, Var::Red, Var::Green], var: Var::Taunt },
Combo { units: vec![Var::Block, Var::Green, Var::Blue], var: Var::Shield },
Combo { units: vec![Var::Block, Var::Green, Var::Blue], var: Var::Life },
Combo { units: vec![Var::Block, Var::Red, Var::Blue], var: Var::Recharge },
Combo { units: vec![Var::Stun, Var::Red, Var::Red], var: Var::Strangle },
@ -372,12 +372,12 @@ fn get_combos() -> Vec<Combo> {
Combo { units: vec![Var::Damage, Var::Green, Var::Blue], var: Var::GBDI },
Combo { units: vec![Var::Damage, Var::Red, Var::Blue], var: Var::RBDI },
Combo { units: vec![Var::Hp, Var::Red, Var::Red], var: Var::RedShieldI },
Combo { units: vec![Var::Hp, Var::Green, Var::Green], var: Var::LifeI },
Combo { units: vec![Var::Hp, Var::Blue, Var::Blue], var: Var::BlueShieldI },
Combo { units: vec![Var::Hp, Var::Red, Var::Green], var: Var::LRSI },
Combo { units: vec![Var::Hp, Var::Green, Var::Blue], var: Var::LBSI },
Combo { units: vec![Var::Hp, Var::Red, Var::Blue], var: Var::RBSI },
Combo { units: vec![Var::GreenLife, Var::Red, Var::Red], var: Var::RedLifeI },
Combo { units: vec![Var::GreenLife, Var::Green, Var::Green], var: Var::LifeI },
Combo { units: vec![Var::GreenLife, Var::Blue, Var::Blue], var: Var::BlueLifeI },
Combo { units: vec![Var::GreenLife, Var::Red, Var::Green], var: Var::LRSI },
Combo { units: vec![Var::GreenLife, Var::Green, Var::Blue], var: Var::LBSI },
Combo { units: vec![Var::GreenLife, Var::Red, Var::Blue], var: Var::RBSI },
Combo { units: vec![Var::Speed, Var::Red, Var::Red], var: Var::RedSpeedI },
Combo { units: vec![Var::Speed, Var::Green, Var::Green], var: Var::GreenSpeedI },
@ -409,7 +409,7 @@ impl Vbox {
let starting_items = vec![
Var::Red,
Var::Attack,
Var::Hp,
Var::GreenLife,
Var::Green,
Var::Attack,
Var::Speed,
@ -464,7 +464,7 @@ impl Vbox {
let specs = vec![
(Var::Damage, 1),
(Var::Hp, 1),
(Var::GreenLife, 1),
(Var::Speed, 1),
];