rename sheidl -> life
This commit is contained in:
parent
81fa77a347
commit
db3c8c2d83
@ -121,7 +121,7 @@ module.exports = {
|
|||||||
colours: '2 Blue',
|
colours: '2 Blue',
|
||||||
},
|
},
|
||||||
|
|
||||||
Shield: {
|
Life: {
|
||||||
description: 'grants immunity to magical skills to target cryp',
|
description: 'grants immunity to magical skills to target cryp',
|
||||||
colours: '1 Green 1 Blue',
|
colours: '1 Green 1 Blue',
|
||||||
},
|
},
|
||||||
@ -224,7 +224,7 @@ module.exports = {
|
|||||||
thresholds: [2, 5, 10],
|
thresholds: [2, 5, 10],
|
||||||
},
|
},
|
||||||
|
|
||||||
Hp: {
|
GreenLife: {
|
||||||
description: 'Increases life',
|
description: 'Increases life',
|
||||||
upgrades: 'combine with 2 red / blue / green',
|
upgrades: 'combine with 2 red / blue / green',
|
||||||
},
|
},
|
||||||
@ -235,32 +235,32 @@ module.exports = {
|
|||||||
thresholds: [5, 10, 20],
|
thresholds: [5, 10, 20],
|
||||||
},
|
},
|
||||||
|
|
||||||
RedShieldI: {
|
RedLifeI: {
|
||||||
description: 'Increased red shield',
|
description: 'Increased red Life',
|
||||||
colours: ['red'],
|
colours: ['red'],
|
||||||
thresholds: [5, 10, 20],
|
thresholds: [5, 10, 20],
|
||||||
},
|
},
|
||||||
|
|
||||||
BlueShieldI: {
|
BlueLifeI: {
|
||||||
description: 'Increased blue shield',
|
description: 'Increased blue Life',
|
||||||
colours: ['blue'],
|
colours: ['blue'],
|
||||||
thresholds: [5, 10, 20],
|
thresholds: [5, 10, 20],
|
||||||
},
|
},
|
||||||
|
|
||||||
LRSI: {
|
LRSI: {
|
||||||
description: 'Increased life and red shield',
|
description: 'Increased life and red Life',
|
||||||
colours: ['green', 'red'],
|
colours: ['green', 'red'],
|
||||||
thresholds: [2, 5, 10],
|
thresholds: [2, 5, 10],
|
||||||
},
|
},
|
||||||
|
|
||||||
LBSI: {
|
LBSI: {
|
||||||
description: 'Increased life and blue shield',
|
description: 'Increased life and blue Life',
|
||||||
colours: ['green', 'blue'],
|
colours: ['green', 'blue'],
|
||||||
thresholds: [2, 5, 10],
|
thresholds: [2, 5, 10],
|
||||||
},
|
},
|
||||||
|
|
||||||
RBSI: {
|
RBSI: {
|
||||||
description: 'Increased red and blue shield',
|
description: 'Increased red and blue Life',
|
||||||
colours: ['red', 'blue'],
|
colours: ['red', 'blue'],
|
||||||
thresholds: [2, 5, 10],
|
thresholds: [2, 5, 10],
|
||||||
},
|
},
|
||||||
|
|||||||
@ -91,7 +91,7 @@ function GamePanel(props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Skill(cryp, i, mobile) {
|
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];
|
const s = cryp.skills[i];
|
||||||
if (!s) {
|
if (!s) {
|
||||||
@ -135,11 +135,11 @@ function GamePanel(props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Cryp(cryp) {
|
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 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}>
|
<figure key={j} alt={s.stat}>
|
||||||
{s.svg(`stat-icon ${s.colour}`)}
|
{s.svg(`stat-icon ${s.colour}`)}
|
||||||
<figcaption>{cryp[s.stat].value} / {cryp[s.stat].max}</figcaption>
|
<figcaption>{cryp[s.stat].value} / {cryp[s.stat].max}</figcaption>
|
||||||
@ -187,7 +187,7 @@ function GamePanel(props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function OpponentCryp(cryp, i) {
|
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}>
|
<figure key={j} alt={s.stat}>
|
||||||
{s.svg(`stat-icon ${s.colour}`)}
|
{s.svg(`stat-icon ${s.colour}`)}
|
||||||
<figcaption>{cryp[s.stat].value} / {cryp[s.stat].max}</figcaption>
|
<figcaption>{cryp[s.stat].value} / {cryp[s.stat].max}</figcaption>
|
||||||
|
|||||||
@ -55,23 +55,23 @@ function requestAvatar(name) {
|
|||||||
const NULL_UUID = '00000000-0000-0000-0000-000000000000';
|
const NULL_UUID = '00000000-0000-0000-0000-000000000000';
|
||||||
|
|
||||||
const STATS = {
|
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 },
|
redDamage: { stat: 'red_damage', colour: 'red', svg: shapes.circle },
|
||||||
greenDamage: { stat: 'green_damage', colour: 'green', svg: shapes.circle },
|
greenDamage: { stat: 'green_damage', colour: 'green', svg: shapes.circle },
|
||||||
blueDamage: { stat: 'blue_damage', colour: 'blue', svg: shapes.circle },
|
blueDamage: { stat: 'blue_damage', colour: 'blue', svg: shapes.circle },
|
||||||
redShield: { stat: 'red_shield', colour: 'red', svg: shapes.square },
|
redLife: { stat: 'red_life', colour: 'red', svg: shapes.square },
|
||||||
hp: { stat: 'hp', colour: 'green', svg: shapes.square },
|
greenLife: { stat: 'green_life', colour: 'green', svg: shapes.square },
|
||||||
blueShield: { stat: 'blue_shield', colour: 'blue', svg: shapes.square },
|
blueLife: { stat: 'blue_life', colour: 'blue', svg: shapes.square },
|
||||||
};
|
};
|
||||||
|
|
||||||
const SPECS = {
|
const SPECS = {
|
||||||
Hp: { colour: 'white', caption: 'Hp', svg: shapes.square },
|
GreenLife: { colour: 'green', caption: 'Life', svg: shapes.square },
|
||||||
RedShieldI: { colour: 'red', caption: 'HpI', svg: shapes.square },
|
RedLifeI: { colour: 'red', caption: 'Life', svg: shapes.square },
|
||||||
BlueShieldI: { colour: 'blue', caption: 'HpI', svg: shapes.square },
|
BlueLifeI: { colour: 'blue', caption: 'Life', svg: shapes.square },
|
||||||
LifeI: { colour: 'green', caption: 'HpI', svg: shapes.square },
|
LifeI: { colour: 'green', caption: 'Life', svg: shapes.square },
|
||||||
LRSI: { colour: 'yellow', caption: 'HpI', svg: shapes.square },
|
LRSI: { colour: 'yellow', caption: 'Life', svg: shapes.square },
|
||||||
LBSI: { colour: 'cyan', caption: 'HpI', svg: shapes.square },
|
LBSI: { colour: 'cyan', caption: 'Life', svg: shapes.square },
|
||||||
RBSI: { colour: 'purple', caption: 'HpI', svg: shapes.square },
|
RBSI: { colour: 'purple', caption: 'Life', svg: shapes.square },
|
||||||
|
|
||||||
Damage: { colour: 'white', caption: 'Damage', svg: shapes.circle },
|
Damage: { colour: 'white', caption: 'Damage', svg: shapes.circle },
|
||||||
RedDamageI: { colour: 'red', caption: 'DamageI', 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 },
|
RBDI: { colour: 'purple', caption: 'DamageI', svg: shapes.circle },
|
||||||
|
|
||||||
Speed: { colour: 'white', caption: 'Speed', svg: shapes.diamond },
|
Speed: { colour: 'white', caption: 'Speed', svg: shapes.diamond },
|
||||||
RedSpeed: { colour: 'red', caption: 'SpeedI', svg: shapes.diamond },
|
RedSpeed: { colour: 'red', caption: 'Speed', svg: shapes.diamond },
|
||||||
BlueSpeedI: { colour: 'blue', caption: 'SpeedI', svg: shapes.diamond },
|
BlueSpeedI: { colour: 'blue', caption: 'Speed', svg: shapes.diamond },
|
||||||
GreenSpeedI: { colour: 'green', caption: 'speed', svg: shapes.diamond },
|
GreenSpeedI: { colour: 'green', caption: 'Speed', svg: shapes.diamond },
|
||||||
GRSpeedI: { colour: 'yellow', caption: 'SpeedI', svg: shapes.diamond },
|
GRSpeedI: { colour: 'yellow', caption: 'Speed', svg: shapes.diamond },
|
||||||
GBSpeedI: { colour: 'cyan', caption: 'SpeedI', svg: shapes.diamond },
|
GBSpeedI: { colour: 'cyan', caption: 'Speed', svg: shapes.diamond },
|
||||||
RBSpeedI: { colour: 'purple', caption: 'SpeedI', svg: shapes.diamond },
|
RBSpeedI: { colour: 'purple', caption: 'Speed', svg: shapes.diamond },
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -67,7 +67,7 @@ Blast - (Attack BB) Deal significant `Blue` damage
|
|||||||
Ruin - (Stun BB) - AOE stun on the enemy team for remaind of turn
|
Ruin - (Stun BB) - AOE stun on the enemy team for remaind of turn
|
||||||
Amplify - (Buff BB) Increased blue damage dealt by target ally
|
Amplify - (Buff BB) Increased blue damage dealt by target ally
|
||||||
Curse - (Debuff BB) Decrease damage dealt by target enemy
|
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) #
|
# 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
|
Purify - (Buff + 2G + 1R) - remove all debuffs from target
|
||||||
Empower - (Buff + 1G + 1R) - Increased red damage dealt by target ally
|
Empower - (Buff + 1G + 1R) - Increased red damage dealt by target ally
|
||||||
???? - (Debuff RB) - ???
|
???? - (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 #
|
# Technology Type (green / blue) type - ??? maybe rework and rename #
|
||||||
|
|
||||||
|
|||||||
@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
### Defenses ###
|
### Defenses ###
|
||||||
|
|
||||||
Rare `Increased Hp`
|
Rare `Increased GreenLife`
|
||||||
|
|
||||||
Common `Increased Evasion rating`
|
Common `Increased Evasion rating`
|
||||||
Common `Increased Blue Shield rating`
|
Common `Increased Blue Life rating`
|
||||||
Common `Increased RedShield rating`
|
Common `Increased RedLife rating`
|
||||||
Common `Increased Healing done`
|
Common `Increased Healing done`
|
||||||
Common `Increased Healing received`
|
Common `Increased Healing received`
|
||||||
Common `Increased Blue Damage`
|
Common `Increased Blue Damage`
|
||||||
@ -15,7 +15,7 @@ Common `Increased Red Damage`
|
|||||||
|
|
||||||
Uncommon `Reduced hp loss penalty to evade chance`
|
Uncommon `Reduced hp loss penalty to evade chance`
|
||||||
Uncommon `Increased base evasion chance per X evasion rating`
|
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 % mitigation from spell shield`
|
||||||
Uncommon `Increased damage over time`
|
Uncommon `Increased damage over time`
|
||||||
|
|
||||||
|
|||||||
@ -85,7 +85,7 @@ In your team Cryp #1 has `Strike`, Cryp #2 has `Slay` and `Heal`, Cryp #3 has `S
|
|||||||
|
|
||||||
### Generic Specs
|
### Generic Specs
|
||||||
|
|
||||||
# Basic % Hp
|
# Basic % GreenLife
|
||||||
`Base` -> 5% inc hp
|
`Base` -> 5% inc hp
|
||||||
`Team Bonus` -> 3 basic gems -> +5% // 6 basic gems -> +10% // 12 basic gems -> +15%
|
`Team Bonus` -> 3 basic gems -> +5% // 6 basic gems -> +10% // 12 basic gems -> +15%
|
||||||
Maximum 35% inc hp
|
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%
|
`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
|
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`
|
Add 2 `red gems`
|
||||||
`Base` -> 10% inc red shield
|
`Base` -> 10% inc red shield
|
||||||
`Team Bonus` 5 red gems -> +10% // 10 red gems -> +15% // 20 red gems -> +20%
|
`Team Bonus` 5 red gems -> +10% // 10 red gems -> +15% // 20 red gems -> +20%
|
||||||
Maximum +55% inc red shield
|
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
|
Add 1 red 1 green gem
|
||||||
`Base` -> 5% inc red shield and 5% inc hp
|
`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%
|
`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
|
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`
|
Add 2 `blue gems`
|
||||||
`Base` -> 10% inc red shield
|
`Base` -> 10% inc red shield
|
||||||
`Team Bonus` 5 blue gems -> +10% // 10 blue gems -> +15% // 20 blue gems -> +20%
|
`Team Bonus` 5 blue gems -> +10% // 10 blue gems -> +15% // 20 blue gems -> +20%
|
||||||
Maximum +55% inc blue shield
|
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`
|
Add `1 blue and 1 green gems`
|
||||||
`Base` -> 5% inc red shield and 5% inc hp
|
`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%
|
`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
|
Maximum +35% inc blue shield and 35% inc hp
|
||||||
|
|
||||||
# Increased % Hp (Basic %HP + 2G)
|
# Increased % GreenLife (Basic %HP + 2G)
|
||||||
Add `2 green gems`
|
Add `2 green gems`
|
||||||
`Base` -> 10% inc hp
|
`Base` -> 10% inc hp
|
||||||
`Team Bonus` 5 green gems -> +10% // 10 green gems -> +15% // 20 green gems -> +20%
|
`Team Bonus` 5 green gems -> +10% // 10 green gems -> +15% // 20 green gems -> +20%
|
||||||
Maximum +55% inc hp
|
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`
|
Add `1 blue and 1 red gem`
|
||||||
`Base` -> 5% inc red shield and 5% inc hp
|
`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%
|
`Team Bonus` (2B + 2R gems) -> +5% + 5% // (5B + 5R gems) -> +10% + 10% % // (10B + 10R) gems -> +15% + 15%
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* phys is faster and chaotic
|
* phys is faster and chaotic
|
||||||
* spells are slow and reliable
|
* spells are slow and reliable
|
||||||
* defensives are implicit
|
* defensives are implicit
|
||||||
* red_shield is restored, not gained
|
* red_life is restored, not gained
|
||||||
* players can feel aggressive
|
* players can feel aggressive
|
||||||
|
|
||||||
- build archtypes
|
- build archtypes
|
||||||
|
|||||||
@ -95,7 +95,7 @@ pub enum Stat {
|
|||||||
Str,
|
Str,
|
||||||
Agi,
|
Agi,
|
||||||
Int,
|
Int,
|
||||||
Hp,
|
GreenLife,
|
||||||
Speed,
|
Speed,
|
||||||
RedDamage,
|
RedDamage,
|
||||||
RedDamageTaken,
|
RedDamageTaken,
|
||||||
@ -103,8 +103,8 @@ pub enum Stat {
|
|||||||
BlueDamageTaken,
|
BlueDamageTaken,
|
||||||
GreenDamage,
|
GreenDamage,
|
||||||
GreenDamageTaken,
|
GreenDamageTaken,
|
||||||
RedShield,
|
RedLife,
|
||||||
BlueShield,
|
BlueLife,
|
||||||
Evasion,
|
Evasion,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,12 +173,12 @@ pub struct Cryp {
|
|||||||
pub id: Uuid,
|
pub id: Uuid,
|
||||||
pub account: Uuid,
|
pub account: Uuid,
|
||||||
pub red_damage: CrypStat,
|
pub red_damage: CrypStat,
|
||||||
pub red_shield: CrypStat,
|
pub red_life: CrypStat,
|
||||||
pub blue_shield: CrypStat,
|
pub blue_life: CrypStat,
|
||||||
pub blue_damage: CrypStat,
|
pub blue_damage: CrypStat,
|
||||||
pub green_damage: CrypStat,
|
pub green_damage: CrypStat,
|
||||||
pub speed: CrypStat,
|
pub speed: CrypStat,
|
||||||
pub hp: CrypStat,
|
pub green_life: CrypStat,
|
||||||
pub evasion: CrypStat,
|
pub evasion: CrypStat,
|
||||||
pub skills: Vec<CrypSkill>,
|
pub skills: Vec<CrypSkill>,
|
||||||
pub effects: Vec<CrypEffect>,
|
pub effects: Vec<CrypEffect>,
|
||||||
@ -194,11 +194,11 @@ impl Cryp {
|
|||||||
id,
|
id,
|
||||||
account: id,
|
account: id,
|
||||||
red_damage: CrypStat { base: 256, value: 256, max: 256, stat: Stat::RedDamage },
|
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_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 },
|
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 },
|
speed: CrypStat { base: 128, value: 128, max: 128, stat: Stat::Speed },
|
||||||
evasion: CrypStat { base: 0, value: 0, max: 0, stat: Stat::Evasion },
|
evasion: CrypStat { base: 0, value: 0, max: 0, stat: Stat::Evasion },
|
||||||
skills: vec![],
|
skills: vec![],
|
||||||
@ -263,19 +263,19 @@ impl Cryp {
|
|||||||
self.specs.sort_unstable();
|
self.specs.sort_unstable();
|
||||||
|
|
||||||
self.red_damage.recalculate(&self.specs, team_colours);
|
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_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.evasion.recalculate(&self.specs, team_colours);
|
||||||
self.speed.recalculate(&self.specs, team_colours);
|
self.speed.recalculate(&self.specs, team_colours);
|
||||||
self.green_damage.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
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_ko(&self) -> bool {
|
pub fn is_ko(&self) -> bool {
|
||||||
self.hp.value == 0
|
self.green_life.value == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn immune(&self, skill: Skill) -> Option<Immunity> {
|
pub fn immune(&self, skill: Skill) -> Option<Immunity> {
|
||||||
@ -453,14 +453,14 @@ impl Cryp {
|
|||||||
return modified_speed;
|
return modified_speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn hp(&self) -> u64 {
|
pub fn green_life(&self) -> u64 {
|
||||||
self.hp.value
|
self.green_life.value
|
||||||
}
|
}
|
||||||
|
|
||||||
fn reduce_hp(&mut self, amount: u64) {
|
fn reduce_green_life(&mut self, amount: u64) {
|
||||||
self.hp.reduce(amount);
|
self.green_life.reduce(amount);
|
||||||
if self.affected(Effect::Clutch) && self.hp() == 0 {
|
if self.affected(Effect::Clutch) && self.green_life() == 0 {
|
||||||
self.hp.value = 1;
|
self.green_life.value = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -473,11 +473,11 @@ impl Cryp {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
let red = self.red_shield.max.saturating_sub(self.red_shield.value);
|
let red = self.red_life.max.saturating_sub(self.red_life.value);
|
||||||
self.red_shield.value = self.red_shield.max;
|
self.red_life.value = self.red_life.max;
|
||||||
|
|
||||||
let blue = self.blue_shield.max.saturating_sub(self.blue_shield.value);
|
let blue = self.blue_life.max.saturating_sub(self.blue_life.value);
|
||||||
self.blue_shield.value = self.blue_shield.max;
|
self.blue_life.value = self.blue_life.max;
|
||||||
|
|
||||||
Event::Recharge { red, blue, skill }
|
Event::Recharge { red, blue, skill }
|
||||||
}
|
}
|
||||||
@ -502,11 +502,11 @@ impl Cryp {
|
|||||||
|
|
||||||
match self.affected(Effect::Invert) {
|
match self.affected(Effect::Invert) {
|
||||||
false => {
|
false => {
|
||||||
let current_hp = self.hp();
|
let current_green_life = self.green_life();
|
||||||
self.hp.increase(modified_damage);
|
self.green_life.increase(modified_damage);
|
||||||
let new_hp = self.hp.value;
|
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;
|
let overhealing = modified_damage - healing;
|
||||||
|
|
||||||
events.push(Event::Healing {
|
events.push(Event::Healing {
|
||||||
@ -519,9 +519,9 @@ impl Cryp {
|
|||||||
events.push(Event::Inversion { skill });
|
events.push(Event::Inversion { skill });
|
||||||
|
|
||||||
// there is no green shield (yet)
|
// there is no green shield (yet)
|
||||||
let current_hp = self.hp();
|
let current_green_life = self.green_life();
|
||||||
self.reduce_hp(modified_damage);
|
self.reduce_green_life(modified_damage);
|
||||||
let delta = current_hp - self.hp();
|
let delta = current_green_life - self.green_life();
|
||||||
|
|
||||||
events.push(Event::Damage {
|
events.push(Event::Damage {
|
||||||
skill,
|
skill,
|
||||||
@ -556,20 +556,20 @@ impl Cryp {
|
|||||||
|
|
||||||
match self.affected(Effect::Invert) {
|
match self.affected(Effect::Invert) {
|
||||||
false => {
|
false => {
|
||||||
// calculate amount of damage red_shield will not absorb
|
// calculate amount of damage red_life will not absorb
|
||||||
// eg 50 red_shield 25 damage -> 0 remainder 25 mitigation
|
// eg 50 red_life 25 damage -> 0 remainder 25 mitigation
|
||||||
// 50 red_shield 100 damage -> 50 remainder 50 mitigation
|
// 50 red_life 100 damage -> 50 remainder 50 mitigation
|
||||||
// 50 red_shield 5 damage -> 0 remainder 5 mitigation
|
// 50 red_life 5 damage -> 0 remainder 5 mitigation
|
||||||
let remainder = modified_damage.saturating_sub(self.red_shield.value);
|
let remainder = modified_damage.saturating_sub(self.red_life.value);
|
||||||
let mitigation = modified_damage.saturating_sub(remainder);
|
let mitigation = modified_damage.saturating_sub(remainder);
|
||||||
|
|
||||||
// reduce red_shield by mitigation amount
|
// reduce red_life by mitigation amount
|
||||||
self.red_shield.reduce(mitigation);
|
self.red_life.reduce(mitigation);
|
||||||
|
|
||||||
// deal remainder to hp
|
// deal remainder to green_life
|
||||||
let current_hp = self.hp();
|
let current_green_life = self.green_life();
|
||||||
self.reduce_hp(remainder);
|
self.reduce_green_life(remainder);
|
||||||
let delta = current_hp - self.hp();
|
let delta = current_green_life - self.green_life();
|
||||||
|
|
||||||
events.push(Event::Damage {
|
events.push(Event::Damage {
|
||||||
skill,
|
skill,
|
||||||
@ -581,15 +581,15 @@ impl Cryp {
|
|||||||
true => {
|
true => {
|
||||||
events.push(Event::Inversion { skill });
|
events.push(Event::Inversion { skill });
|
||||||
|
|
||||||
let current_hp = self.hp();
|
let current_green_life = self.green_life();
|
||||||
self.hp.increase(modified_damage);
|
self.green_life.increase(modified_damage);
|
||||||
let new_hp = self.hp.value;
|
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;
|
let overhealing = modified_damage - healing;
|
||||||
|
|
||||||
let current_shield = self.red_shield.value;
|
let current_life = self.red_life.value;
|
||||||
self.red_shield.increase(overhealing);
|
self.red_life.increase(overhealing);
|
||||||
let recharge = self.red_shield.value - current_shield;
|
let recharge = self.red_life.value - current_life;
|
||||||
|
|
||||||
if healing > 0 {
|
if healing > 0 {
|
||||||
events.push(Event::Healing {
|
events.push(Event::Healing {
|
||||||
@ -629,16 +629,16 @@ impl Cryp {
|
|||||||
|
|
||||||
match self.affected(Effect::Invert) {
|
match self.affected(Effect::Invert) {
|
||||||
false => {
|
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);
|
let mitigation = modified_damage.saturating_sub(remainder);
|
||||||
|
|
||||||
// reduce blue_shield by mitigation amount
|
// reduce blue_life by mitigation amount
|
||||||
self.blue_shield.reduce(mitigation);
|
self.blue_life.reduce(mitigation);
|
||||||
|
|
||||||
// deal remainder to hp
|
// deal remainder to green_life
|
||||||
let current_hp = self.hp();
|
let current_green_life = self.green_life();
|
||||||
self.reduce_hp(remainder);
|
self.reduce_green_life(remainder);
|
||||||
let delta = current_hp - self.hp();
|
let delta = current_green_life - self.green_life();
|
||||||
|
|
||||||
events.push(Event::Damage {
|
events.push(Event::Damage {
|
||||||
skill,
|
skill,
|
||||||
@ -650,15 +650,15 @@ impl Cryp {
|
|||||||
true => {
|
true => {
|
||||||
events.push(Event::Inversion { skill });
|
events.push(Event::Inversion { skill });
|
||||||
|
|
||||||
let current_hp = self.hp();
|
let current_green_life = self.green_life();
|
||||||
self.hp.increase(modified_damage);
|
self.green_life.increase(modified_damage);
|
||||||
let new_hp = self.hp.value;
|
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;
|
let overhealing = modified_damage - healing;
|
||||||
|
|
||||||
let current_shield = self.blue_shield.value;
|
let current_life = self.blue_life.value;
|
||||||
self.blue_shield.increase(overhealing);
|
self.blue_life.increase(overhealing);
|
||||||
let recharge = self.blue_shield.value - current_shield;
|
let recharge = self.blue_life.value - current_life;
|
||||||
|
|
||||||
if healing > 0 {
|
if healing > 0 {
|
||||||
events.push(Event::Healing {
|
events.push(Event::Healing {
|
||||||
@ -704,8 +704,8 @@ impl Cryp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let mut rng = thread_rng();
|
let mut rng = thread_rng();
|
||||||
let hp_pct = (self.hp.value * 100) / self.hp.value;
|
let green_life_pct = (self.green_life.value * 100) / self.green_life.value;
|
||||||
let evasion_rating = (self.evasion.value * hp_pct) / 100;
|
let evasion_rating = (self.evasion.value * green_life_pct) / 100;
|
||||||
let roll = rng.gen_range(0, 100);
|
let roll = rng.gen_range(0, 100);
|
||||||
println!("{:} < {:?}", roll, evasion_rating);
|
println!("{:} < {:?}", roll, evasion_rating);
|
||||||
|
|
||||||
@ -817,7 +817,7 @@ mod tests {
|
|||||||
cryp.spec_add(Spec::LifeI).unwrap();
|
cryp.spec_add(Spec::LifeI).unwrap();
|
||||||
cryp.spec_add(Spec::RedDamageI).unwrap();
|
cryp.spec_add(Spec::RedDamageI).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.red, 6);
|
||||||
assert_eq!(cryp.colours.green, 2);
|
assert_eq!(cryp.colours.green, 2);
|
||||||
@ -843,9 +843,9 @@ mod tests {
|
|||||||
|
|
||||||
cryp.apply_modifiers(&team_colours);
|
cryp.apply_modifiers(&team_colours);
|
||||||
|
|
||||||
assert!(cryp.red_damage.value == cryp.red_damage.base + cryp.red_damage.base.pct(10));
|
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(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(65));
|
assert!(cryp.blue_damage.value == cryp.blue_damage.base + cryp.blue_damage.base.pct(80));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1062,7 +1062,7 @@ mod tests {
|
|||||||
|
|
||||||
// just in case
|
// just in case
|
||||||
// remove all mitigation
|
// 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();
|
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();
|
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
|
// should not be stunned because of parry
|
||||||
assert!(game.team_by_id(x_team.id).cryps[0].is_stunned() == false);
|
assert!(game.team_by_id(x_team.id).cryps[0].is_stunned() == false);
|
||||||
// riposte
|
// 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]
|
#[test]
|
||||||
@ -1237,7 +1237,7 @@ mod tests {
|
|||||||
assert!([Phase::Skill, Phase::Finish].contains(&game.phase));
|
assert!([Phase::Skill, Phase::Finish].contains(&game.phase));
|
||||||
|
|
||||||
// kill a cryp
|
// 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(i_team.id).skills_required() == 1);
|
||||||
assert!(game.team_by_id(x_team.id).skills_required() == 2);
|
assert!(game.team_by_id(x_team.id).skills_required() == 2);
|
||||||
|
|||||||
@ -20,15 +20,15 @@ pub enum ItemAction {
|
|||||||
RerollRedDamage,
|
RerollRedDamage,
|
||||||
RerollBlueDamage,
|
RerollBlueDamage,
|
||||||
RerollSpeed,
|
RerollSpeed,
|
||||||
RerollHp,
|
RerollGreenLife,
|
||||||
RerollRedShield,
|
RerollRedLife,
|
||||||
RerollBlueShield,
|
RerollBlueLife,
|
||||||
RerollEvasion,
|
RerollEvasion,
|
||||||
|
|
||||||
SpecRedDamage5,
|
SpecRedDamage5,
|
||||||
SpecBlueDamage5,
|
SpecBlueDamage5,
|
||||||
SpecRedShield5,
|
SpecRedLife5,
|
||||||
SpecBlueShield5,
|
SpecBlueLife5,
|
||||||
SpecBlueEvasion5,
|
SpecBlueEvasion5,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,12 +52,12 @@ impl Item {
|
|||||||
|
|
||||||
fn apply(&mut self, tx: &mut Transaction, target: Uuid) -> Result<(), Error> {
|
fn apply(&mut self, tx: &mut Transaction, target: Uuid) -> Result<(), Error> {
|
||||||
match self.action {
|
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::RerollRedDamage => reroll(self, tx, target, Stat::RedDamage),
|
||||||
ItemAction::RerollBlueDamage => reroll(self, tx, target, Stat::BlueDamage),
|
ItemAction::RerollBlueDamage => reroll(self, tx, target, Stat::BlueDamage),
|
||||||
ItemAction::RerollSpeed => reroll(self, tx, target, Stat::Speed),
|
ItemAction::RerollSpeed => reroll(self, tx, target, Stat::Speed),
|
||||||
ItemAction::RerollRedShield => reroll(self, tx, target, Stat::RedShield),
|
ItemAction::RerollRedLife => reroll(self, tx, target, Stat::RedLife),
|
||||||
ItemAction::RerollBlueShield => reroll(self, tx, target, Stat::BlueShield),
|
ItemAction::RerollBlueLife => reroll(self, tx, target, Stat::BlueLife),
|
||||||
ItemAction::RerollEvasion => reroll(self, tx, target, Stat::Evasion),
|
ItemAction::RerollEvasion => reroll(self, tx, target, Stat::Evasion),
|
||||||
|
|
||||||
ItemAction::SpecRedDamage5 => spec_add(self, tx, target, SpecType::RedDamage5),
|
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)> {
|
fn mode_drops(mode: GameMode) -> Vec<(ItemAction, usize)> {
|
||||||
match mode {
|
match mode {
|
||||||
GameMode::Normal => vec![
|
GameMode::Normal => vec![
|
||||||
(ItemAction::RerollHp, 1),
|
(ItemAction::RerollGreenLife, 1),
|
||||||
(ItemAction::RerollRedDamage, 1),
|
(ItemAction::RerollRedDamage, 1),
|
||||||
(ItemAction::RerollBlueDamage, 1),
|
(ItemAction::RerollBlueDamage, 1),
|
||||||
],
|
],
|
||||||
@ -96,19 +96,19 @@ fn mode_drops(mode: GameMode) -> Vec<(ItemAction, usize)> {
|
|||||||
GameMode::Zone2v2Caster |
|
GameMode::Zone2v2Caster |
|
||||||
GameMode::Zone3v3MeleeMiniboss => vec![
|
GameMode::Zone3v3MeleeMiniboss => vec![
|
||||||
(ItemAction::RerollEvasion, 1),
|
(ItemAction::RerollEvasion, 1),
|
||||||
(ItemAction::RerollRedShield, 1),
|
(ItemAction::RerollRedLife, 1),
|
||||||
(ItemAction::RerollBlueShield, 1),
|
(ItemAction::RerollBlueLife, 1),
|
||||||
],
|
],
|
||||||
GameMode::Zone3v3HealerBoss => vec![
|
GameMode::Zone3v3HealerBoss => vec![
|
||||||
(ItemAction::RerollSpeed, 1),
|
(ItemAction::RerollSpeed, 1),
|
||||||
],
|
],
|
||||||
// _ => vec![
|
// _ => vec![
|
||||||
// (ItemAction::RerollHp, 1),
|
// (ItemAction::RerollGreenLife, 1),
|
||||||
// (ItemAction::RerollRedDamage, 1),
|
// (ItemAction::RerollRedDamage, 1),
|
||||||
// (ItemAction::RerollBlueDamage, 1),
|
// (ItemAction::RerollBlueDamage, 1),
|
||||||
// (ItemAction::RerollSpeed, 1),
|
// (ItemAction::RerollSpeed, 1),
|
||||||
// (ItemAction::RerollRedShield, 1),
|
// (ItemAction::RerollRedLife, 1),
|
||||||
// (ItemAction::RerollBlueShield, 1),
|
// (ItemAction::RerollBlueLife, 1),
|
||||||
// (ItemAction::RerollEvasion, 1),
|
// (ItemAction::RerollEvasion, 1),
|
||||||
// ],
|
// ],
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,7 +63,7 @@ pub fn resolve(skill: Skill, source: &mut Cryp, target: &mut Cryp, mut resolutio
|
|||||||
Skill::Reflect => reflect(source, target, resolutions),
|
Skill::Reflect => reflect(source, target, resolutions),
|
||||||
Skill::Riposte => panic!("riposte should not be caste"),
|
Skill::Riposte => panic!("riposte should not be caste"),
|
||||||
Skill::Ruin => ruin(source, target, resolutions),
|
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::Silence => silence(source, target, resolutions), // target cannot cast spells
|
||||||
Skill::Siphon => siphon(source, target, resolutions),
|
Skill::Siphon => siphon(source, target, resolutions),
|
||||||
Skill::SiphonTick => siphon_tick(source, target, resolutions), // hot
|
Skill::SiphonTick => siphon_tick(source, target, resolutions), // hot
|
||||||
@ -261,7 +261,7 @@ pub enum Effect {
|
|||||||
Hatred,
|
Hatred,
|
||||||
|
|
||||||
// magic immunity
|
// magic immunity
|
||||||
Shield,
|
Life,
|
||||||
|
|
||||||
// effects over time
|
// effects over time
|
||||||
Triage,
|
Triage,
|
||||||
@ -283,7 +283,7 @@ impl Effect {
|
|||||||
Category::Red => true,
|
Category::Red => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
},
|
},
|
||||||
Effect::Shield => match skill.category() {
|
Effect::Life => match skill.category() {
|
||||||
Category::Blue => true,
|
Category::Blue => true,
|
||||||
Category::Red => false,
|
Category::Red => false,
|
||||||
_ => false,
|
_ => false,
|
||||||
@ -416,7 +416,7 @@ impl Effect {
|
|||||||
Effect::Hostility => Category::BlueBuff,
|
Effect::Hostility => Category::BlueBuff,
|
||||||
|
|
||||||
// magic immunity
|
// magic immunity
|
||||||
Effect::Shield => Category::BlueBuff,
|
Effect::Life => Category::BlueBuff,
|
||||||
Effect::Invert => Category::GreenBuff,
|
Effect::Invert => Category::GreenBuff,
|
||||||
|
|
||||||
// effects over time
|
// effects over time
|
||||||
@ -470,7 +470,7 @@ impl Effect {
|
|||||||
Effect::Corrupt => 2,
|
Effect::Corrupt => 2,
|
||||||
Effect::Corruption => 3,
|
Effect::Corruption => 3,
|
||||||
|
|
||||||
Effect::Shield => 2,
|
Effect::Life => 2,
|
||||||
|
|
||||||
Effect::Triage => 3,
|
Effect::Triage => 3,
|
||||||
Effect::Decay => 3,
|
Effect::Decay => 3,
|
||||||
@ -564,7 +564,7 @@ pub enum Skill {
|
|||||||
// Purity
|
// Purity
|
||||||
// -----------------
|
// -----------------
|
||||||
Empower,
|
Empower,
|
||||||
Shield,
|
Life,
|
||||||
Silence,
|
Silence,
|
||||||
Purify,
|
Purify,
|
||||||
Purge,
|
Purge,
|
||||||
@ -608,7 +608,7 @@ impl Skill {
|
|||||||
Skill::SiphonTick => None,
|
Skill::SiphonTick => None,
|
||||||
Skill::Curse => Some(1),
|
Skill::Curse => Some(1),
|
||||||
Skill::Empower => Some(1),
|
Skill::Empower => Some(1),
|
||||||
Skill::Shield => None,
|
Skill::Life => None,
|
||||||
Skill::Silence => Some(1),
|
Skill::Silence => Some(1),
|
||||||
Skill::Purify => None,
|
Skill::Purify => None,
|
||||||
Skill::Purge => None,
|
Skill::Purge => None,
|
||||||
@ -663,7 +663,7 @@ impl Skill {
|
|||||||
Skill::TriageTick => Category::GreenTick, // hot
|
Skill::TriageTick => Category::GreenTick, // hot
|
||||||
Skill::Throw => Category::Green,
|
Skill::Throw => Category::Green,
|
||||||
Skill::Empower => Category::Green,
|
Skill::Empower => Category::Green,
|
||||||
Skill::Shield => Category::Green,
|
Skill::Life => Category::Green,
|
||||||
Skill::Purify => Category::Green,
|
Skill::Purify => Category::Green,
|
||||||
Skill::Recharge => Category::Green,
|
Skill::Recharge => Category::Green,
|
||||||
Skill::Reflect => 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 {
|
fn shield(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions) -> Resolutions {
|
||||||
let shield = CrypEffect::new(Effect::Shield);
|
let shield = CrypEffect::new(Effect::Life);
|
||||||
results.push(Resolution::new(source, target).event(target.add_effect(Skill::Shield, shield)));
|
results.push(Resolution::new(source, target).event(target.add_effect(Skill::Life, shield)));
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1135,7 +1135,7 @@ mod tests {
|
|||||||
|
|
||||||
y.reduce_effect_durations();
|
y.reduce_effect_durations();
|
||||||
let _decay = y.effects.iter().find(|e| e.effect == Effect::Decay);
|
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]
|
#[test]
|
||||||
@ -1148,7 +1148,7 @@ mod tests {
|
|||||||
|
|
||||||
// ensure it doesn't have 0 pd
|
// ensure it doesn't have 0 pd
|
||||||
x.red_damage.force(100);
|
x.red_damage.force(100);
|
||||||
y.hp.force(500);
|
y.green_life.force(500);
|
||||||
|
|
||||||
block(&mut y.clone(), &mut y, vec![]);
|
block(&mut y.clone(), &mut y, vec![]);
|
||||||
assert!(y.effects.iter().any(|e| e.effect == Effect::Block));
|
assert!(y.effects.iter().any(|e| e.effect == Effect::Block));
|
||||||
@ -1176,7 +1176,7 @@ mod tests {
|
|||||||
assert!(y.affected(Effect::Clutch));
|
assert!(y.affected(Effect::Clutch));
|
||||||
|
|
||||||
let mut results = attack(&mut x, &mut y, vec![]);
|
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);
|
let Resolution { source: _, target: _, event } = results.remove(0);
|
||||||
match event {
|
match event {
|
||||||
@ -1207,8 +1207,8 @@ mod tests {
|
|||||||
.named(&"camel".to_string());
|
.named(&"camel".to_string());
|
||||||
|
|
||||||
// give red shield but reduce to 0
|
// give red shield but reduce to 0
|
||||||
y.red_shield.force(64);
|
y.red_life.force(64);
|
||||||
y.red_shield.reduce(64);
|
y.red_life.reduce(64);
|
||||||
x.red_damage.force(256 + 64);
|
x.red_damage.force(256 + 64);
|
||||||
|
|
||||||
invert(&mut y.clone(), &mut y, vec![]);
|
invert(&mut y.clone(), &mut y, vec![]);
|
||||||
@ -1216,11 +1216,11 @@ mod tests {
|
|||||||
|
|
||||||
// heal should deal green damage
|
// heal should deal green damage
|
||||||
heal(&mut x, &mut y, vec![]);
|
heal(&mut x, &mut y, vec![]);
|
||||||
assert!(y.hp() == 768);
|
assert!(y.green_life() == 768);
|
||||||
|
|
||||||
// attack should heal and recharge red shield
|
// attack should heal and recharge red shield
|
||||||
let mut results = attack(&mut x, &mut y, vec![]);
|
let mut results = attack(&mut x, &mut y, vec![]);
|
||||||
assert!(y.hp() == 1024);
|
assert!(y.green_life() == 1024);
|
||||||
|
|
||||||
match results.remove(0).event {
|
match results.remove(0).event {
|
||||||
Event::Inversion { skill } => assert_eq!(skill, Skill::Attack),
|
Event::Inversion { skill } => assert_eq!(skill, Skill::Attack),
|
||||||
@ -1252,7 +1252,7 @@ mod tests {
|
|||||||
let mut results = vec![];
|
let mut results = vec![];
|
||||||
results = resolve(Skill::Attack, &mut x, &mut y, results);
|
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);
|
let Resolution { source: _, target: _, event } = results.remove(0);
|
||||||
match event {
|
match event {
|
||||||
@ -1275,12 +1275,12 @@ mod tests {
|
|||||||
let mut y = Cryp::new()
|
let mut y = Cryp::new()
|
||||||
.named(&"camel".to_string());
|
.named(&"camel".to_string());
|
||||||
|
|
||||||
x.hp.reduce(512);
|
x.green_life.reduce(512);
|
||||||
|
|
||||||
let mut results = resolve(Skill::Siphon, &mut x, &mut y, vec![]);
|
let mut results = resolve(Skill::Siphon, &mut x, &mut y, vec![]);
|
||||||
|
|
||||||
assert!(y.affected(Effect::Siphon));
|
assert!(y.affected(Effect::Siphon));
|
||||||
assert!(x.hp() == 768);
|
assert!(x.green_life() == 768);
|
||||||
|
|
||||||
let Resolution { source: _, target: _, event } = results.remove(0);
|
let Resolution { source: _, target: _, event } = results.remove(0);
|
||||||
match event {
|
match event {
|
||||||
@ -1347,16 +1347,16 @@ mod tests {
|
|||||||
x.blue_damage.force(50);
|
x.blue_damage.force(50);
|
||||||
|
|
||||||
// remove all mitigation
|
// remove all mitigation
|
||||||
y.red_shield.force(0);
|
y.red_life.force(0);
|
||||||
y.blue_shield.force(0);
|
y.blue_life.force(0);
|
||||||
|
|
||||||
y.deal_red_damage(Skill::Attack, 5);
|
y.deal_red_damage(Skill::Attack, 5);
|
||||||
let prev_hp = y.hp();
|
let prev_hp = y.green_life();
|
||||||
|
|
||||||
triage(&mut x, &mut y, vec![]);
|
triage(&mut x, &mut y, vec![]);
|
||||||
|
|
||||||
assert!(y.effects.iter().any(|e| e.effect == Effect::Triage));
|
assert!(y.effects.iter().any(|e| e.effect == Effect::Triage));
|
||||||
assert!(y.hp() > prev_hp);
|
assert!(y.green_life() > prev_hp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -1367,8 +1367,8 @@ mod tests {
|
|||||||
let mut y = Cryp::new()
|
let mut y = Cryp::new()
|
||||||
.named(&"pretaliation".to_string());
|
.named(&"pretaliation".to_string());
|
||||||
|
|
||||||
y.red_shield.force(50);
|
y.red_life.force(50);
|
||||||
y.blue_shield.force(50);
|
y.blue_life.force(50);
|
||||||
|
|
||||||
y.deal_red_damage(Skill::Attack, 5);
|
y.deal_red_damage(Skill::Attack, 5);
|
||||||
y.deal_blue_damage(Skill::Blast, 5);
|
y.deal_blue_damage(Skill::Blast, 5);
|
||||||
@ -1485,7 +1485,7 @@ mod tests {
|
|||||||
// // -----------------
|
// // -----------------
|
||||||
// Empower,
|
// Empower,
|
||||||
// Slay,
|
// Slay,
|
||||||
// Shield,
|
// Life,
|
||||||
// Silence,
|
// Silence,
|
||||||
// Inquiry,
|
// Inquiry,
|
||||||
// Purify,
|
// Purify,
|
||||||
|
|||||||
@ -9,12 +9,12 @@ pub enum Spec {
|
|||||||
GRSpeedI,
|
GRSpeedI,
|
||||||
GBSpeedI,
|
GBSpeedI,
|
||||||
RBSpeedI,
|
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
|
// that is multiplied
|
||||||
Hp,
|
GreenLife,
|
||||||
LifeI,
|
LifeI,
|
||||||
RedShieldI,
|
RedLifeI,
|
||||||
BlueShieldI,
|
BlueLifeI,
|
||||||
LRSI,
|
LRSI,
|
||||||
LBSI,
|
LBSI,
|
||||||
RBSI,
|
RBSI,
|
||||||
@ -57,13 +57,13 @@ impl Spec {
|
|||||||
Spec::GBSpeedI => vec![Stat::Speed],
|
Spec::GBSpeedI => vec![Stat::Speed],
|
||||||
Spec::RBSpeedI => vec![Stat::Speed],
|
Spec::RBSpeedI => vec![Stat::Speed],
|
||||||
|
|
||||||
Spec::Hp => vec![Stat::Hp],
|
Spec::GreenLife => vec![Stat::GreenLife],
|
||||||
Spec::RedShieldI => vec![Stat::RedShield],
|
Spec::RedLifeI => vec![Stat::RedLife],
|
||||||
Spec::BlueShieldI => vec![Stat::BlueShield],
|
Spec::BlueLifeI => vec![Stat::BlueLife],
|
||||||
Spec::LifeI => vec![Stat::Hp],
|
Spec::LifeI => vec![Stat::GreenLife],
|
||||||
Spec::LRSI => vec![Stat::Hp, Stat::RedShield],
|
Spec::LRSI => vec![Stat::GreenLife, Stat::RedLife],
|
||||||
Spec::LBSI => vec![Stat::Hp, Stat::BlueShield],
|
Spec::LBSI => vec![Stat::GreenLife, Stat::BlueLife],
|
||||||
Spec::RBSI => vec![Stat::BlueShield, Stat::RedShield],
|
Spec::RBSI => vec![Stat::BlueLife, Stat::RedLife],
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -160,7 +160,7 @@ impl Spec {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// Upgrades to HP Spec
|
// Upgrades to HP Spec
|
||||||
Spec::Hp => modified + base.pct(5),
|
Spec::GreenLife => modified + base.pct(5),
|
||||||
Spec::LifeI => modified + {
|
Spec::LifeI => modified + {
|
||||||
let mut mult: u64 = 15;
|
let mut mult: u64 = 15;
|
||||||
if team_colours.red >= 5 { mult += 25 };
|
if team_colours.red >= 5 { mult += 25 };
|
||||||
@ -168,14 +168,14 @@ impl Spec {
|
|||||||
if team_colours.red >= 20 { mult += 75 };
|
if team_colours.red >= 20 { mult += 75 };
|
||||||
mult * team_colours.green as u64
|
mult * team_colours.green as u64
|
||||||
},
|
},
|
||||||
Spec::RedShieldI => modified + {
|
Spec::RedLifeI => modified + {
|
||||||
let mut mult: u64 = 15;
|
let mut mult: u64 = 15;
|
||||||
if team_colours.red >= 5 { mult += 25 };
|
if team_colours.red >= 5 { mult += 25 };
|
||||||
if team_colours.red >= 10 { mult += 50 };
|
if team_colours.red >= 10 { mult += 50 };
|
||||||
if team_colours.red >= 20 { mult += 75 };
|
if team_colours.red >= 20 { mult += 75 };
|
||||||
mult * team_colours.red as u64
|
mult * team_colours.red as u64
|
||||||
},
|
},
|
||||||
Spec::BlueShieldI => modified + {
|
Spec::BlueLifeI => modified + {
|
||||||
let mut mult: u64 = 15;
|
let mut mult: u64 = 15;
|
||||||
if team_colours.red >= 5 { mult += 25 };
|
if team_colours.red >= 5 { mult += 25 };
|
||||||
if team_colours.red >= 10 { mult += 50 };
|
if team_colours.red >= 10 { mult += 50 };
|
||||||
|
|||||||
@ -35,13 +35,13 @@ pub enum Var {
|
|||||||
// specs
|
// specs
|
||||||
// Base
|
// Base
|
||||||
Damage,
|
Damage,
|
||||||
Hp,
|
GreenLife,
|
||||||
Speed,
|
Speed,
|
||||||
|
|
||||||
// Shields Upgrades
|
// Lifes Upgrades
|
||||||
LifeI,
|
LifeI,
|
||||||
RedShieldI,
|
RedLifeI,
|
||||||
BlueShieldI,
|
BlueLifeI,
|
||||||
LRSI,
|
LRSI,
|
||||||
LBSI,
|
LBSI,
|
||||||
RBSI,
|
RBSI,
|
||||||
@ -79,7 +79,7 @@ pub enum Var {
|
|||||||
Reflect,
|
Reflect,
|
||||||
Recharge,
|
Recharge,
|
||||||
Ruin,
|
Ruin,
|
||||||
Shield,
|
Life,
|
||||||
Silence,
|
Silence,
|
||||||
Slay,
|
Slay,
|
||||||
Slow,
|
Slow,
|
||||||
@ -134,7 +134,7 @@ impl Var {
|
|||||||
Var::Stun => 2,
|
Var::Stun => 2,
|
||||||
|
|
||||||
Var::Damage => 3,
|
Var::Damage => 3,
|
||||||
Var::Hp => 3,
|
Var::GreenLife => 3,
|
||||||
Var::Speed => 3,
|
Var::Speed => 3,
|
||||||
|
|
||||||
_ => {
|
_ => {
|
||||||
@ -198,7 +198,7 @@ impl Var {
|
|||||||
Var::Recharge => Some(Skill::Recharge),
|
Var::Recharge => Some(Skill::Recharge),
|
||||||
Var::Reflect => Some(Skill::Reflect),
|
Var::Reflect => Some(Skill::Reflect),
|
||||||
Var::Ruin => Some(Skill::Ruin),
|
Var::Ruin => Some(Skill::Ruin),
|
||||||
Var::Shield => Some(Skill::Shield),
|
Var::Life => Some(Skill::Life),
|
||||||
Var::Silence => Some(Skill::Silence),
|
Var::Silence => Some(Skill::Silence),
|
||||||
// Var::Slay => Some(Skill::Slay),
|
// Var::Slay => Some(Skill::Slay),
|
||||||
Var::Slow => Some(Skill::Slow),
|
Var::Slow => Some(Skill::Slow),
|
||||||
@ -233,13 +233,13 @@ impl Var {
|
|||||||
Var::GBDI => Some(Spec::GBDI),
|
Var::GBDI => Some(Spec::GBDI),
|
||||||
Var::RBDI => Some(Spec::RBDI),
|
Var::RBDI => Some(Spec::RBDI),
|
||||||
|
|
||||||
Var::Hp => Some(Spec::Hp),
|
Var::GreenLife => Some(Spec::GreenLife),
|
||||||
Var::LifeI => Some(Spec::LifeI),
|
Var::LifeI => Some(Spec::LifeI),
|
||||||
Var::LRSI => Some(Spec::LRSI),
|
Var::LRSI => Some(Spec::LRSI),
|
||||||
Var::LBSI => Some(Spec::LBSI),
|
Var::LBSI => Some(Spec::LBSI),
|
||||||
Var::RBSI => Some(Spec::RBSI),
|
Var::RBSI => Some(Spec::RBSI),
|
||||||
Var::RedShieldI => Some(Spec::RedShieldI),
|
Var::RedLifeI => Some(Spec::RedLifeI),
|
||||||
Var::BlueShieldI => Some(Spec::BlueShieldI),
|
Var::BlueLifeI => Some(Spec::BlueLifeI),
|
||||||
|
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
@ -268,7 +268,7 @@ impl From<Skill> for Var {
|
|||||||
Skill::Recharge => Var::Recharge,
|
Skill::Recharge => Var::Recharge,
|
||||||
Skill::Reflect => Var::Reflect,
|
Skill::Reflect => Var::Reflect,
|
||||||
Skill::Ruin => Var::Ruin,
|
Skill::Ruin => Var::Ruin,
|
||||||
Skill::Shield => Var::Shield,
|
Skill::Life => Var::Life,
|
||||||
Skill::Silence => Var::Silence,
|
Skill::Silence => Var::Silence,
|
||||||
Skill::Siphon => Var::Siphon,
|
Skill::Siphon => Var::Siphon,
|
||||||
Skill::Slow => Var::Slow,
|
Skill::Slow => Var::Slow,
|
||||||
@ -310,13 +310,13 @@ impl From<Spec> for Var {
|
|||||||
Spec::GBDI => Var::GBDI,
|
Spec::GBDI => Var::GBDI,
|
||||||
Spec::RBDI => Var::RBDI,
|
Spec::RBDI => Var::RBDI,
|
||||||
|
|
||||||
Spec::Hp => Var::Hp,
|
Spec::GreenLife => Var::GreenLife,
|
||||||
Spec::LifeI => Var::LifeI,
|
Spec::LifeI => Var::LifeI,
|
||||||
Spec::LRSI => Var::LRSI,
|
Spec::LRSI => Var::LRSI,
|
||||||
Spec::LBSI => Var::LBSI,
|
Spec::LBSI => Var::LBSI,
|
||||||
Spec::RBSI => Var::RBSI,
|
Spec::RBSI => Var::RBSI,
|
||||||
Spec::RedShieldI => Var::RedShieldI,
|
Spec::RedLifeI => Var::RedLifeI,
|
||||||
Spec::BlueShieldI => Var::BlueShieldI,
|
Spec::BlueLifeI => Var::BlueLifeI,
|
||||||
// _ => panic!("{:?} not implemented as a var", spec),
|
// _ => 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::Green, Var::Green], var: Var::Reflect },
|
||||||
Combo { units: vec![Var::Block, Var::Blue, Var::Blue], var: Var::Corrupt },
|
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::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::Block, Var::Red, Var::Blue], var: Var::Recharge },
|
||||||
|
|
||||||
Combo { units: vec![Var::Stun, Var::Red, Var::Red], var: Var::Strangle },
|
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::Green, Var::Blue], var: Var::GBDI },
|
||||||
Combo { units: vec![Var::Damage, Var::Red, Var::Blue], var: Var::RBDI },
|
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::GreenLife, Var::Red, Var::Red], var: Var::RedLifeI },
|
||||||
Combo { units: vec![Var::Hp, Var::Green, Var::Green], var: Var::LifeI },
|
Combo { units: vec![Var::GreenLife, Var::Green, Var::Green], var: Var::LifeI },
|
||||||
Combo { units: vec![Var::Hp, Var::Blue, Var::Blue], var: Var::BlueShieldI },
|
Combo { units: vec![Var::GreenLife, Var::Blue, Var::Blue], var: Var::BlueLifeI },
|
||||||
Combo { units: vec![Var::Hp, Var::Red, Var::Green], var: Var::LRSI },
|
Combo { units: vec![Var::GreenLife, Var::Red, Var::Green], var: Var::LRSI },
|
||||||
Combo { units: vec![Var::Hp, Var::Green, Var::Blue], var: Var::LBSI },
|
Combo { units: vec![Var::GreenLife, 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::Blue], var: Var::RBSI },
|
||||||
|
|
||||||
Combo { units: vec![Var::Speed, Var::Red, Var::Red], var: Var::RedSpeedI },
|
Combo { units: vec![Var::Speed, Var::Red, Var::Red], var: Var::RedSpeedI },
|
||||||
Combo { units: vec![Var::Speed, Var::Green, Var::Green], var: Var::GreenSpeedI },
|
Combo { units: vec![Var::Speed, Var::Green, Var::Green], var: Var::GreenSpeedI },
|
||||||
@ -409,7 +409,7 @@ impl Vbox {
|
|||||||
let starting_items = vec![
|
let starting_items = vec![
|
||||||
Var::Red,
|
Var::Red,
|
||||||
Var::Attack,
|
Var::Attack,
|
||||||
Var::Hp,
|
Var::GreenLife,
|
||||||
Var::Green,
|
Var::Green,
|
||||||
Var::Attack,
|
Var::Attack,
|
||||||
Var::Speed,
|
Var::Speed,
|
||||||
@ -464,7 +464,7 @@ impl Vbox {
|
|||||||
|
|
||||||
let specs = vec![
|
let specs = vec![
|
||||||
(Var::Damage, 1),
|
(Var::Damage, 1),
|
||||||
(Var::Hp, 1),
|
(Var::GreenLife, 1),
|
||||||
(Var::Speed, 1),
|
(Var::Speed, 1),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user