fix(skills): hand-built attacks level the skill they scale with
Form attacks and powers called Damage directly, and vanilla only raises a skill inside Attack and Projectile.OnHit, so the skill never moved. FormMelee.RaiseSkill pays once per swing or tick that hit a creature. - Fenrir forms' claws and bites: Unarmed; Cultist fire: Elemental Magic - Skadi drake melee and Trenta stomp: Unarmed - Aswid aura: Blood Magic, 0.1 per second like the Frost Aura - Alfar Geisli and Ljosstorm: Elemental Magic; Sameining pulse 0.1/s - Trenta Purple Rain scales with Blood Magic (two new bonus keys) and levels it once per cast that reaches someone besides the caster
This commit is contained in:
parent
eeebfd4d06
commit
d9bca1934f
11 changed files with 105 additions and 9 deletions
|
|
@ -774,6 +774,7 @@ namespace RacesOfValheim
|
|||
Collider[] hits = Physics.OverlapSphere(attackPoint, attackRadius, layerMask);
|
||||
FormMelee.LogSwing(FormLabel, hits.Length);
|
||||
System.Collections.Generic.HashSet<GameObject> hitObjects = new System.Collections.Generic.HashSet<GameObject>();
|
||||
bool hitCreature = false;
|
||||
|
||||
foreach (Collider hit in hits)
|
||||
{
|
||||
|
|
@ -823,10 +824,13 @@ namespace RacesOfValheim
|
|||
FormMelee.LogHit(FormLabel, target, totalDamage);
|
||||
target.Damage(hitData);
|
||||
FormMelee.GrantAdrenaline(target);
|
||||
if (target is Character) hitCreature = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hitCreature) FormMelee.RaiseSkill(Skills.SkillType.Unarmed);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1067,6 +1071,7 @@ namespace RacesOfValheim
|
|||
Collider[] hits = Physics.OverlapSphere(attackPoint, attackRadius, layerMask);
|
||||
FormMelee.LogSwing(FormLabel, hits.Length);
|
||||
System.Collections.Generic.HashSet<GameObject> hitObjects = new System.Collections.Generic.HashSet<GameObject>();
|
||||
bool hitCreature = false;
|
||||
|
||||
foreach (Collider hit in hits)
|
||||
{
|
||||
|
|
@ -1106,6 +1111,7 @@ namespace RacesOfValheim
|
|||
FormMelee.LogHit(FormLabel, target, totalDamage);
|
||||
target.Damage(hitData);
|
||||
FormMelee.GrantAdrenaline(target, 0.2f); // one 0.2s tick: a full hit per second of breath
|
||||
if (target is Character) hitCreature = true;
|
||||
|
||||
if (ZNetScene.instance != null)
|
||||
{
|
||||
|
|
@ -1115,6 +1121,8 @@ namespace RacesOfValheim
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hitCreature) FormMelee.RaiseSkill(Skills.SkillType.ElementalMagic, 0.2f); // one 0.2s tick: a full swing's worth per second of breath
|
||||
}
|
||||
|
||||
private IEnumerator ClawRoutine()
|
||||
|
|
@ -1231,6 +1239,7 @@ namespace RacesOfValheim
|
|||
Collider[] hits = Physics.OverlapSphere(attackPoint, attackRadius, layerMask);
|
||||
FormMelee.LogSwing(FormLabel, hits.Length);
|
||||
System.Collections.Generic.HashSet<GameObject> hitObjects = new System.Collections.Generic.HashSet<GameObject>();
|
||||
bool hitCreature = false;
|
||||
|
||||
foreach (Collider hit in hits)
|
||||
{
|
||||
|
|
@ -1280,10 +1289,13 @@ namespace RacesOfValheim
|
|||
FormMelee.LogHit(FormLabel, target, totalDamage);
|
||||
target.Damage(hitData);
|
||||
FormMelee.GrantAdrenaline(target);
|
||||
if (target is Character) hitCreature = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hitCreature) FormMelee.RaiseSkill(Skills.SkillType.Unarmed);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1446,6 +1458,7 @@ namespace RacesOfValheim
|
|||
Collider[] hits = Physics.OverlapSphere(attackPoint, attackRadius, layerMask);
|
||||
FormMelee.LogSwing(FormLabel, hits.Length);
|
||||
System.Collections.Generic.HashSet<GameObject> hitObjects = new System.Collections.Generic.HashSet<GameObject>();
|
||||
bool hitCreature = false;
|
||||
|
||||
foreach (Collider hit in hits)
|
||||
{
|
||||
|
|
@ -1495,10 +1508,13 @@ namespace RacesOfValheim
|
|||
FormMelee.LogHit(FormLabel, target, totalDamage);
|
||||
target.Damage(hitData);
|
||||
FormMelee.GrantAdrenaline(target);
|
||||
if (target is Character) hitCreature = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hitCreature) FormMelee.RaiseSkill(Skills.SkillType.Unarmed);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1654,6 +1670,7 @@ namespace RacesOfValheim
|
|||
Collider[] hits = Physics.OverlapSphere(attackPoint, attackRadius, layerMask);
|
||||
FormMelee.LogSwing(FormLabel, hits.Length);
|
||||
System.Collections.Generic.HashSet<GameObject> hitObjects = new System.Collections.Generic.HashSet<GameObject>();
|
||||
bool hitCreature = false;
|
||||
|
||||
foreach (Collider hit in hits)
|
||||
{
|
||||
|
|
@ -1703,10 +1720,13 @@ namespace RacesOfValheim
|
|||
FormMelee.LogHit(FormLabel, target, totalDamage);
|
||||
target.Damage(hitData);
|
||||
FormMelee.GrantAdrenaline(target);
|
||||
if (target is Character) hitCreature = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hitCreature) FormMelee.RaiseSkill(Skills.SkillType.Unarmed);
|
||||
}
|
||||
|
||||
private IEnumerator UlvJumpAttackRoutine()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue