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)
|
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;
|
return;
|
||||||
|
|
||||||
Think(tickCounter); // let the brain think.
|
Think(tickCounter); // let the brain think.
|
||||||
|
|||||||
@ -383,13 +383,18 @@ namespace DiIiS_NA.GameServer.GSSystem.AISystem.Brains
|
|||||||
// Logger.Trace("PowerAction to target");
|
// Logger.Trace("PowerAction to target");
|
||||||
CurrentAction = new PowerAction(Body, powerToUse, Target);
|
CurrentAction = new PowerAction(Body, powerToUse, Target);
|
||||||
|
|
||||||
if (power is SummoningSkill)
|
PresetPowers[powerToUse] = power switch
|
||||||
PresetPowers[powerToUse] = new Cooldown
|
{
|
||||||
{ CooldownTimer = null, CooldownTime = (Body is Boss ? 15f : 7f) };
|
SummoningSkill => new Cooldown
|
||||||
|
{
|
||||||
if (power is MonsterAffixSkill monsterSkill)
|
CooldownTimer = null, CooldownTime = (Body is Boss ? 15f : 7f)
|
||||||
PresetPowers[powerToUse] = new Cooldown
|
},
|
||||||
{ CooldownTimer = null, CooldownTime = monsterSkill.CooldownTime };
|
MonsterAffixSkill monsterSkill => new Cooldown
|
||||||
|
{
|
||||||
|
CooldownTimer = null, CooldownTime = monsterSkill.CooldownTime
|
||||||
|
},
|
||||||
|
_ => PresetPowers[powerToUse]
|
||||||
|
};
|
||||||
|
|
||||||
if (PresetPowers[powerToUse].CooldownTime > 0f)
|
if (PresetPowers[powerToUse].CooldownTime > 0f)
|
||||||
PresetPowers[powerToUse] = new Cooldown
|
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()}");
|
$"{GetType().Name} {nameof(FastAttack)} {nameof(PowerAction)} to target [{Target.ActorType}] {Target.SNO.ToString()}");
|
||||||
CurrentAction = new PowerAction(Body, skillSno, target);
|
CurrentAction = new PowerAction(Body, skillSno, target);
|
||||||
|
|
||||||
if (power is SummoningSkill)
|
PresetPowers[skillSno] = power switch
|
||||||
PresetPowers[skillSno] = new Cooldown
|
{
|
||||||
{ CooldownTimer = null, CooldownTime = (Body is Boss ? 15f : 7f) };
|
SummoningSkill => new Cooldown { CooldownTimer = null, CooldownTime = (Body is Boss ? 15f : 7f) },
|
||||||
|
MonsterAffixSkill monsterAffixSkill => new Cooldown
|
||||||
if (power is MonsterAffixSkill monsterAffixSkill)
|
{
|
||||||
PresetPowers[skillSno] = new Cooldown
|
CooldownTimer = null, CooldownTime = monsterAffixSkill.CooldownTime
|
||||||
{ CooldownTimer = null, CooldownTime = monsterAffixSkill.CooldownTime };
|
},
|
||||||
|
_ => PresetPowers[skillSno]
|
||||||
|
};
|
||||||
|
|
||||||
if (PresetPowers[skillSno].CooldownTime > 0f)
|
if (PresetPowers[skillSno].CooldownTime > 0f)
|
||||||
PresetPowers[skillSno] = new Cooldown
|
PresetPowers[skillSno] = new Cooldown
|
||||||
|
|||||||
@ -190,6 +190,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem
|
|||||||
int count = player.World.Game.Players.Count;
|
int count = player.World.Game.Players.Count;
|
||||||
if (count > 0 && _adjustedPlayers != 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.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_Max] = _nativeHp * (1f + ((0.75f + (0.1f * player.World.Game.Difficulty)) * (count - 1)));
|
||||||
Attributes[GameAttributes.Hitpoints_Cur] = Attributes[GameAttributes.Hitpoints_Max_Total];
|
Attributes[GameAttributes.Hitpoints_Cur] = Attributes[GameAttributes.Hitpoints_Max_Total];
|
||||||
|
|||||||
Loading…
Reference in New Issue
user.block.title