mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Changed lifesteal beam particles to look better.
Warding aura now just provides damage reduction instead of invulnerability. Also with a longer duration and less movespeed penalty.
This commit is contained in:
parent
53100b6f37
commit
398370ca51
@ -4,9 +4,9 @@ CastAura(
|
|||||||
recover_duration: 0.25,
|
recover_duration: 0.25,
|
||||||
targets: InGroup,
|
targets: InGroup,
|
||||||
aura: (
|
aura: (
|
||||||
kind: Invulnerability,
|
kind: ProtectingWard,
|
||||||
strength: 1.0,
|
strength: 0.5,
|
||||||
duration: Some(0.5),
|
duration: Some(10.0),
|
||||||
category: Magical,
|
category: Magical,
|
||||||
),
|
),
|
||||||
range: 25.0,
|
range: 25.0,
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
"buff.desc.campfire_heal": "Resting at a campfire heals 1% per second.",
|
"buff.desc.campfire_heal": "Resting at a campfire heals 1% per second.",
|
||||||
"buff.title.invulnerability": "Invulnerability",
|
"buff.title.invulnerability": "Invulnerability",
|
||||||
"buff.desc.invulnerability": "You cannot be damaged by any attack.",
|
"buff.desc.invulnerability": "You cannot be damaged by any attack.",
|
||||||
|
"buff.title.protectingward": "Protecting Ward",
|
||||||
|
"buff.desc.protectingward": "You are protected, somewhat, from attacks."
|
||||||
// Debuffs
|
// Debuffs
|
||||||
"buff.title.bleed": "Bleeding",
|
"buff.title.bleed": "Bleeding",
|
||||||
"buff.desc.bleed": "Inflicts regular damage.",
|
"buff.desc.bleed": "Inflicts regular damage.",
|
||||||
|
@ -346,7 +346,7 @@ void main() {
|
|||||||
attr = Attr(
|
attr = Attr(
|
||||||
spiral_motion(inst_dir, 0.3 * (floor(2 * rand0 + 0.5) - 0.5) * min(linear_scale(10), 1), lifetime / inst_lifespan, 10.0, inst_time),
|
spiral_motion(inst_dir, 0.3 * (floor(2 * rand0 + 0.5) - 0.5) * min(linear_scale(10), 1), lifetime / inst_lifespan, 10.0, inst_time),
|
||||||
vec3((1.7 - 0.7 * abs(floor(2 * rand0 - 0.5) + 0.5)) * (1.5 + 0.5 * sin(tick.x * 10 - lifetime * 4))),
|
vec3((1.7 - 0.7 * abs(floor(2 * rand0 - 0.5) + 0.5)) * (1.5 + 0.5 * sin(tick.x * 10 - lifetime * 4))),
|
||||||
vec4(vec3(1.0 + 0.3 * sin(tick.x + lifetime * 5), 1.25 + 0.2 * sin(tick.x * 10 - lifetime * 3 + 4), 0.7), 1 /*0.3*/),
|
vec4(vec3(1.35 + 0.25 * sin(tick.x * 3 - lifetime * 3 + 4), 0.7 + 1.0 * sin(tick.x * 5 + lifetime * 5), 0.8 + 0.25 * sin(lifetime - tick.x * 5)), 1 /*0.3*/),
|
||||||
spin_in_axis(inst_dir, tick.z)
|
spin_in_axis(inst_dir, tick.z)
|
||||||
);
|
);
|
||||||
} else if (inst_mode == ENERGY_NATURE) {
|
} else if (inst_mode == ENERGY_NATURE) {
|
||||||
|
@ -33,6 +33,8 @@ pub enum BuffKind {
|
|||||||
IncreaseMaxHealth,
|
IncreaseMaxHealth,
|
||||||
/// Makes you immune to attacks
|
/// Makes you immune to attacks
|
||||||
Invulnerability,
|
Invulnerability,
|
||||||
|
/// Reduces incoming damage
|
||||||
|
ProtectingWard,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
@ -49,6 +51,7 @@ impl BuffKind {
|
|||||||
BuffKind::IncreaseMaxEnergy => true,
|
BuffKind::IncreaseMaxEnergy => true,
|
||||||
BuffKind::IncreaseMaxHealth => true,
|
BuffKind::IncreaseMaxHealth => true,
|
||||||
BuffKind::Invulnerability => true,
|
BuffKind::Invulnerability => true,
|
||||||
|
BuffKind::ProtectingWard => true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,16 +104,11 @@ pub enum BuffEffect {
|
|||||||
kind: ModifierKind,
|
kind: ModifierKind,
|
||||||
},
|
},
|
||||||
/// Changes maximum health by a certain amount
|
/// Changes maximum health by a certain amount
|
||||||
MaxHealthModifier {
|
MaxHealthModifier { value: f32, kind: ModifierKind },
|
||||||
value: f32,
|
|
||||||
kind: ModifierKind,
|
|
||||||
},
|
|
||||||
/// Changes maximum stamina by a certain amount
|
/// Changes maximum stamina by a certain amount
|
||||||
MaxEnergyModifier {
|
MaxEnergyModifier { value: f32, kind: ModifierKind },
|
||||||
value: f32,
|
/// Reduces damage after armor is accounted for by this fraction
|
||||||
kind: ModifierKind,
|
DamageReduction(f32),
|
||||||
},
|
|
||||||
ImmuneToAttacks,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Actual de/buff.
|
/// Actual de/buff.
|
||||||
@ -213,7 +211,16 @@ impl Buff {
|
|||||||
}],
|
}],
|
||||||
data.duration,
|
data.duration,
|
||||||
),
|
),
|
||||||
BuffKind::Invulnerability => (vec![BuffEffect::ImmuneToAttacks], data.duration),
|
BuffKind::Invulnerability => (vec![BuffEffect::DamageReduction(1.0)], data.duration),
|
||||||
|
BuffKind::ProtectingWard => (
|
||||||
|
vec![BuffEffect::DamageReduction(
|
||||||
|
// Causes non-linearity in effect strength, but necessary to allow for tool
|
||||||
|
// power and other things to affect the strength. 0.5 also still provides 50%
|
||||||
|
// damage reduction.
|
||||||
|
data.strength / (0.5 + data.strength),
|
||||||
|
)],
|
||||||
|
data.duration,
|
||||||
|
),
|
||||||
};
|
};
|
||||||
Buff {
|
Buff {
|
||||||
kind,
|
kind,
|
||||||
|
@ -47,7 +47,7 @@ impl CharacterBehavior for Data {
|
|||||||
fn behavior(&self, data: &JoinData) -> StateUpdate {
|
fn behavior(&self, data: &JoinData) -> StateUpdate {
|
||||||
let mut update = StateUpdate::from(data);
|
let mut update = StateUpdate::from(data);
|
||||||
|
|
||||||
handle_move(data, &mut update, 0.6);
|
handle_move(data, &mut update, 0.8);
|
||||||
handle_jump(data, &mut update);
|
handle_jump(data, &mut update);
|
||||||
if !ability_key_is_pressed(data, self.static_data.ability_info.key) {
|
if !ability_key_is_pressed(data, self.static_data.ability_info.key) {
|
||||||
handle_interrupt(data, &mut update, false);
|
handle_interrupt(data, &mut update, false);
|
||||||
|
@ -165,8 +165,8 @@ impl<'a> System<'a> for Sys {
|
|||||||
energy.set_maximum(new_max);
|
energy.set_maximum(new_max);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
BuffEffect::ImmuneToAttacks => {
|
BuffEffect::DamageReduction(dr) => {
|
||||||
stat.damage_reduction = 1.0;
|
stat.damage_reduction = dr.min(1.0);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -3282,6 +3282,8 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id {
|
|||||||
BuffKind::IncreaseMaxEnergy { .. } => imgs.buff_energyplus_0,
|
BuffKind::IncreaseMaxEnergy { .. } => imgs.buff_energyplus_0,
|
||||||
BuffKind::IncreaseMaxHealth { .. } => imgs.buff_healthplus_0,
|
BuffKind::IncreaseMaxHealth { .. } => imgs.buff_healthplus_0,
|
||||||
BuffKind::Invulnerability => imgs.buff_invincibility_0,
|
BuffKind::Invulnerability => imgs.buff_invincibility_0,
|
||||||
|
// Do not merge until icon for this buff
|
||||||
|
BuffKind::ProtectingWard => imgs.buff_invincibility_0,
|
||||||
// Debuffs
|
// Debuffs
|
||||||
BuffKind::Bleeding { .. } => imgs.debuff_bleed_0,
|
BuffKind::Bleeding { .. } => imgs.debuff_bleed_0,
|
||||||
BuffKind::Cursed { .. } => imgs.debuff_skull_0,
|
BuffKind::Cursed { .. } => imgs.debuff_skull_0,
|
||||||
@ -3298,6 +3300,7 @@ pub fn get_buff_title(buff: BuffKind, localized_strings: &Localization) -> &str
|
|||||||
BuffKind::IncreaseMaxHealth { .. } => localized_strings.get("buff.title.IncreaseMaxHealth"),
|
BuffKind::IncreaseMaxHealth { .. } => localized_strings.get("buff.title.IncreaseMaxHealth"),
|
||||||
BuffKind::IncreaseMaxEnergy { .. } => localized_strings.get("buff.title.staminaup"),
|
BuffKind::IncreaseMaxEnergy { .. } => localized_strings.get("buff.title.staminaup"),
|
||||||
BuffKind::Invulnerability => localized_strings.get("buff.title.invulnerability"),
|
BuffKind::Invulnerability => localized_strings.get("buff.title.invulnerability"),
|
||||||
|
BuffKind::ProtectingWard => localized_strings.get("buff.title.protectingward"),
|
||||||
// Debuffs
|
// Debuffs
|
||||||
BuffKind::Bleeding { .. } => localized_strings.get("buff.title.bleed"),
|
BuffKind::Bleeding { .. } => localized_strings.get("buff.title.bleed"),
|
||||||
BuffKind::Cursed { .. } => localized_strings.get("buff.title.cursed"),
|
BuffKind::Cursed { .. } => localized_strings.get("buff.title.cursed"),
|
||||||
@ -3314,6 +3317,7 @@ pub fn get_buff_desc(buff: BuffKind, localized_strings: &Localization) -> &str {
|
|||||||
BuffKind::IncreaseMaxHealth { .. } => localized_strings.get("buff.desc.IncreaseMaxHealth"),
|
BuffKind::IncreaseMaxHealth { .. } => localized_strings.get("buff.desc.IncreaseMaxHealth"),
|
||||||
BuffKind::IncreaseMaxEnergy { .. } => localized_strings.get("buff.desc.IncreaseMaxEnergy"),
|
BuffKind::IncreaseMaxEnergy { .. } => localized_strings.get("buff.desc.IncreaseMaxEnergy"),
|
||||||
BuffKind::Invulnerability => localized_strings.get("buff.desc.invulnerability"),
|
BuffKind::Invulnerability => localized_strings.get("buff.desc.invulnerability"),
|
||||||
|
BuffKind::ProtectingWard => localized_strings.get("buff.desc.protectingward"),
|
||||||
// Debuffs
|
// Debuffs
|
||||||
BuffKind::Bleeding { .. } => localized_strings.get("buff.desc.bleed"),
|
BuffKind::Bleeding { .. } => localized_strings.get("buff.desc.bleed"),
|
||||||
BuffKind::Cursed { .. } => localized_strings.get("buff.desc.cursed"),
|
BuffKind::Cursed { .. } => localized_strings.get("buff.desc.cursed"),
|
||||||
|
Loading…
Reference in New Issue
Block a user