7 | 8 | ||
---|---|---|---|
77 | set; | 77 | set; |
78 | } | 78 | } |
79 | 79 | ||
80 | public int ReflectDamage | ||
81 | { | ||
82 | get | ||
83 | { | ||
84 | return ((1 + (this.Stats.GetTotal(EffectEnum.AddSagesse) / 100)) * this.Stats.GetTotal(EffectEnum.AddRenvoiDamage)) + this.Stats.GetTotal(EffectEnum.AddRenvoiDamageItem); | ||
85 | } | ||
86 | } | ||
87 | |||
80 | public int MaxLife | 88 | public int MaxLife |
81 | { | 89 | { |
82 | get | 90 | get |
... | ... | ||
115 | } | 123 | } |
116 | set | 124 | set |
117 | { | 125 | { |
118 | this.CurrentLife = value; | 126 | this.CurrentLife = value - this.Stats.GetTotal(EffectEnum.AddVitalite) + this.Stats.GetTotal(EffectEnum.AddVie); |
119 | } | 127 | } |
120 | } | 128 | } |
121 | 129 | ||
... | ... | ||
198 | set; | 206 | set; |
199 | } | 207 | } |
200 | 208 | ||
209 | public int SkinSize | ||
210 | { | ||
211 | get; | ||
212 | set; | ||
213 | } | ||
214 | |||
201 | public GenericStats Stats | 215 | public GenericStats Stats |
202 | { | 216 | { |
203 | get; | 217 | get; |
... | ... | ||
260 | /// Contructeur unique, type de l'entitée | 274 | /// Contructeur unique, type de l'entitée |
261 | /// </summary> | 275 | /// </summary> |
262 | /// <param name="ActorType"></param> | 276 | /// <param name="ActorType"></param> |
263 | public Fighter(GameActorTypeEnum ActorType, Fight Fight) | 277 | public Fighter(Fight Fight, GameActorTypeEnum ActorType) |
264 | { | 278 | { |
265 | this.ActorType = ActorType; | 279 | this.ActorType = ActorType; |
266 | this.Fight = Fight; | 280 | this.Fight = Fight; |
267 | this.Buffs = new FighterBuff(); | 281 | this.Buffs = new FighterBuff(); |
268 | this.States = new FighterState(); | 282 | this.States = new FighterState(this); |
269 | this.SpellsController = new FighterSpell(); | 283 | this.SpellsController = new FighterSpell(); |
270 | } | 284 | } |
271 | 285 | ||
... | ... | ||
277 | public int SetCell(FightCell Cell) | 291 | public int SetCell(FightCell Cell) |
278 | { | 292 | { |
279 | if (this.myCell != null) | 293 | if (this.myCell != null) |
280 | this.myCell.RemoveFighter(this); // On vire le fighter de la cell: | 294 | this.myCell.RemoveObject(this); // On vire le fighter de la cell: |
281 | 295 | ||
282 | this.myCell = Cell; | 296 | this.myCell = Cell; |
283 | 297 | ||
284 | if (this.myCell.AddFighter(this) == -3) | 298 | if (this.myCell != null) |
285 | return -3; | 299 | { |
300 | // Ajout du combattant sur la cell | ||
301 | if (this.myCell.AddObject(this) == -3) | ||
302 | return-3; | ||
286 | 303 | ||
287 | if (this.Buffs.EndMove() == -3) | 304 | if (this.Buffs.EndMove() == -3) |
288 | return -3; | 305 | return -3; |
306 | } | ||
289 | 307 | ||
290 | return -1; | 308 | return -1; |
291 | } | 309 | } |
... | ... | ||
295 | /// </summary> | 313 | /// </summary> |
296 | /// <param name="StatsToMerge"></param> | 314 | /// <param name="StatsToMerge"></param> |
297 | /// <param name="ActorId"></param> | 315 | /// <param name="ActorId"></param> |
298 | protected void InitFighter(GenericStats StatsToMerge, long ActorId, int AP, int MP, int Skin) | 316 | protected void InitFighter(GenericStats StatsToMerge, long ActorId, int Skin) |
299 | { | 317 | { |
300 | // Init des stats | 318 | // Init des stats |
301 | this.Stats = new GenericStats(); | 319 | this.Stats = new GenericStats(); |
... | ... | ||
304 | // Init des infos generiques | 322 | // Init des infos generiques |
305 | this.ActorId = ActorId; | 323 | this.ActorId = ActorId; |
306 | this.Skin = Skin; | 324 | this.Skin = Skin; |
325 | this.SkinSize = 100; | ||
307 | this.Life = MaxLife; | 326 | this.Life = MaxLife; |
308 | } | 327 | } |
309 | 328 | ||
... | ... | ||
316 | } | 335 | } |
317 | 336 | ||
318 | // On le vire de la cell | 337 | // On le vire de la cell |
319 | Cell.RemoveFighter(this); | 338 | Cell.RemoveObject(this); |
320 | } | 339 | } |
321 | 340 | ||
322 | public int TryDie(long CasterId, bool force = false) | 341 | public int TryDie(long CasterId, bool force = false) |
... | ... | ||
451 | /// <summary> | 470 | /// <summary> |
452 | /// Calcul de l'armure | 471 | /// Calcul de l'armure |
453 | /// </summary> | 472 | /// </summary> |
454 | /// <param name="Effect"></param> | 473 | /// <param name="DamageEffect"></param> |
455 | /// <param name="Damage"></param> | 474 | public int CalculArmor(EffectEnum DamageEffect) |
456 | public int CalculArmor(EffectEnum Effect) | ||
457 | { | 475 | { |
458 | switch (Effect) | 476 | switch (DamageEffect) |
459 | { | 477 | { |
460 | case EffectEnum.AddArmorTerre: | 478 | case EffectEnum.DamageTerre: |
461 | return this.Stats.GetTotal(EffectEnum.AddArmorTerre) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddForce) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddForce) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200); | 479 | case EffectEnum.VolTerre: |
480 | case EffectEnum.DamageNeutre: | ||
481 | case EffectEnum.VolNeutre: | ||
482 | return (this.Stats.GetTotal(EffectEnum.AddArmorTerre) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddForce) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddForce) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200)) + | ||
483 | (this.Stats.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddForce) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddForce) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200)); | ||
462 | 484 | ||
463 | case EffectEnum.AddArmorFeu: | 485 | case EffectEnum.DamageFeu: |
464 | return this.Stats.GetTotal(EffectEnum.AddArmorFeu) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200); | 486 | case EffectEnum.VolFeu: |
465 | 487 | return (this.Stats.GetTotal(EffectEnum.AddArmorFeu) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200)) + | |
466 | case EffectEnum.AddArmorEau: | 488 | (this.Stats.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200)); |
467 | return this.Stats.GetTotal(EffectEnum.AddArmorAir) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddAgilite) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddAgilite) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200); | ||
468 | | ||
469 | case EffectEnum.AddArmorAir: | ||
470 | return this.Stats.GetTotal(EffectEnum.AddArmorEau) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddChance) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddChance) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200); | ||
471 | 489 | ||
472 | case EffectEnum.AddArmor: | 490 | case EffectEnum.DamageAir: |
473 | return this.Stats.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200); | 491 | case EffectEnum.VolAir: |
492 | return (this.Stats.GetTotal(EffectEnum.AddArmorAir) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddAgilite) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddAgilite) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200)) + | ||
493 | (this.Stats.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddAgilite) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddAgilite) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200)); | ||
494 | |||
495 | case EffectEnum.DamageEau: | ||
496 | case EffectEnum.VolEau: | ||
497 | return (this.Stats.GetTotal(EffectEnum.AddArmorEau) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddChance) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddChance) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200)) + | ||
498 | (this.Stats.GetTotal(EffectEnum.AddArmor) * Math.Max(1 + this.Stats.GetTotal(EffectEnum.AddChance) / 100, 1 + this.Stats.GetTotal(EffectEnum.AddChance) / 200 + this.Stats.GetTotal(EffectEnum.AddIntelligence) / 200)); | ||
499 | |||
474 | } | 500 | } |
475 | 501 | ||
476 | return 0; | 502 | return 0; |