update
This commit is contained in:
parent
09e0480485
commit
dd11da0da5
@ -47,7 +47,7 @@ namespace DiIiS_NA.GameServer.GSSystem.AISystem
|
||||
|
||||
public virtual void Update(int tickCounter)
|
||||
{
|
||||
if (State == BrainState.Dead || Body == null || Body.World == null || State == BrainState.Off)
|
||||
if (State == BrainState.Dead || Body?.World == null || State == BrainState.Off)
|
||||
return;
|
||||
|
||||
Think(tickCounter); // let the brain think.
|
||||
|
||||
@ -383,13 +383,18 @@ namespace DiIiS_NA.GameServer.GSSystem.AISystem.Brains
|
||||
// Logger.Trace("PowerAction to target");
|
||||
CurrentAction = new PowerAction(Body, powerToUse, Target);
|
||||
|
||||
if (power is SummoningSkill)
|
||||
PresetPowers[powerToUse] = new Cooldown
|
||||
{ CooldownTimer = null, CooldownTime = (Body is Boss ? 15f : 7f) };
|
||||
|
||||
if (power is MonsterAffixSkill monsterSkill)
|
||||
PresetPowers[powerToUse] = new Cooldown
|
||||
{ CooldownTimer = null, CooldownTime = monsterSkill.CooldownTime };
|
||||
PresetPowers[powerToUse] = power switch
|
||||
{
|
||||
SummoningSkill => new Cooldown
|
||||
{
|
||||
CooldownTimer = null, CooldownTime = (Body is Boss ? 15f : 7f)
|
||||
},
|
||||
MonsterAffixSkill monsterSkill => new Cooldown
|
||||
{
|
||||
CooldownTimer = null, CooldownTime = monsterSkill.CooldownTime
|
||||
},
|
||||
_ => PresetPowers[powerToUse]
|
||||
};
|
||||
|
||||
if (PresetPowers[powerToUse].CooldownTime > 0f)
|
||||
PresetPowers[powerToUse] = new Cooldown
|
||||
@ -472,13 +477,15 @@ namespace DiIiS_NA.GameServer.GSSystem.AISystem.Brains
|
||||
$"{GetType().Name} {nameof(FastAttack)} {nameof(PowerAction)} to target [{Target.ActorType}] {Target.SNO.ToString()}");
|
||||
CurrentAction = new PowerAction(Body, skillSno, target);
|
||||
|
||||
if (power is SummoningSkill)
|
||||
PresetPowers[skillSno] = new Cooldown
|
||||
{ CooldownTimer = null, CooldownTime = (Body is Boss ? 15f : 7f) };
|
||||
|
||||
if (power is MonsterAffixSkill monsterAffixSkill)
|
||||
PresetPowers[skillSno] = new Cooldown
|
||||
{ CooldownTimer = null, CooldownTime = monsterAffixSkill.CooldownTime };
|
||||
PresetPowers[skillSno] = power switch
|
||||
{
|
||||
SummoningSkill => new Cooldown { CooldownTimer = null, CooldownTime = (Body is Boss ? 15f : 7f) },
|
||||
MonsterAffixSkill monsterAffixSkill => new Cooldown
|
||||
{
|
||||
CooldownTimer = null, CooldownTime = monsterAffixSkill.CooldownTime
|
||||
},
|
||||
_ => PresetPowers[skillSno]
|
||||
};
|
||||
|
||||
if (PresetPowers[skillSno].CooldownTime > 0f)
|
||||
PresetPowers[skillSno] = new Cooldown
|
||||
|
||||
@ -190,6 +190,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
|
||||
int count = player.World.Game.Players.Count;
|
||||
if (count > 0 && _adjustedPlayers != count)
|
||||
{
|
||||
// TODO: add modifiers for difficulty settings?
|
||||
Attributes[GameAttributes.Damage_Weapon_Min, 0] = _nativeDmg * (1f + (0.05f * (count - 1) * player.World.Game.Difficulty));
|
||||
Attributes[GameAttributes.Hitpoints_Max] = _nativeHp * (1f + ((0.75f + (0.1f * player.World.Game.Difficulty)) * (count - 1)));
|
||||
Attributes[GameAttributes.Hitpoints_Cur] = Attributes[GameAttributes.Hitpoints_Max_Total];
|
||||
|
||||
Loading…
Reference in New Issue
user.block.title