private void InitializeAssemblies() { BoosterAssembly = new BoosterAssembly(this); HangarAssembly = new PlayerHangarAssembly(this); MovementAssembly = new PlayerMovementAssembly(this); DroneFormationAssembly = new PlayerDroneFormationAssembly(this); AttackAssembly = new PlayerAttackAssembly(this); SpecialItemsAssembly = new PlayerSpecialItemsAssembly(this); EffectsAssembly = new PlayerEffectsAssembly(this); AttackTraceAssembly = new AttackTraceAssembly(this); ZoneAssembly = new ZoneAssembly(this); PlayerTechAssembly = new PlayerTechAssembly(this); PlayerAbilityAssembly = new PlayerAbilityAssembly(this); PlayerGroupAssembly = new PlayerGroupAssembly(this); PlayerItemsAssembly = new PlayerItemsAssembly(this); BoosterAssembly.Multiply(BoosterType.DAMAGE, 1.6); BoosterAssembly.Multiply(BoosterType.DAMAGE, 2); BoosterAssembly.Multiply(BoosterType.SHIELD, 1.7); BoosterAssembly.Multiply(BoosterType.SPEED, 1.2); BoosterAssembly.Multiply(BoosterType.HITPOINTS, 1.2); BoosterAssembly.Multiply(BoosterType.HIT_RATE, 0.8); InitializeTimer(); }
public NpcController(int id, string username, Faction faction) : base(id, username, faction) { BoosterAssembly = new BoosterAssembly(this); HangarAssembly = new NpcHangarAssembly(this, Ship.YAMATO, Map.MAP_R_ZONE, new Position(10000, 6000), 1_000_000, 1_000_000); MovementAssembly = new MovementAssembly(this); AttackAssembly = new NpcAttackAssembly(this); EffectsAssembly = new EffectsAssembly(this); AttackTraceAssembly = new AttackTraceAssembly(this); ZoneAssembly = new ZoneAssembly(this); BoosterAssembly.Set(BoosterType.SHIELD_REGNERATION, 0.05); BoosterAssembly.Set(BoosterType.SHIELD_ABSORBATION, 0.5); BoosterAssembly.Set(BoosterType.HITPOINTS_REGENERATION, 0.01); TimerStart(); InitializeTimer(); SpacemapController.For(HangarAssembly.Map.ID).Add(this); }
public override void Die() { PlayerEffectsAssembly.CureInfection(true); MovementAssembly.Move(MovementAssembly.ActualPosition(), MovementAssembly.ActualPosition()); Lock(null); EntitiesLockedSafe(x => { if (x.Locked != null && x.Locked.ID == ID) { x.Lock(null); } }); ICommand killCommand = PacketBuilder.KillCommand(this); GameManager.Get(AttackTraceAssembly.CurrentMainAttacker, out PlayerController killer); Send(killCommand, PacketBuilder.KillScreen.KillScreenCommand(DestructionTypeModule.PLAYER, killer)); // send kill screen EntitesInRange(x => { if (x.ID == AttackTraceAssembly.CurrentMainAttacker) // killer // render rewards etc. { x.Send( killCommand, PacketBuilder.Legacy("0|A|STD|You killed " + Account.Username + "!") ); } else { x.Send(killCommand); } }); AttackTraceAssembly.Reset(); Spacemap?.Remove(this); // remove from spacemap TimerStop(); }