Skip to content

Commit

Permalink
feat: implement eAction method for Akali class
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurin-Notemann committed Dec 10, 2022
1 parent 1204cc2 commit 77f3f73
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions src/championList/Akali.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import {
AllConditions as AC,
checkCondition,
checkIfConditonExists,
} from '../Ability/dynamicAbilityData/ActionConditions';
import { Champion } from '../Champion/Champion';
import { Damage } from '../Damage/Damage';
import { DamageType } from '../RawChampion/abilities/staticDataEnums';
Expand Down Expand Up @@ -42,10 +47,10 @@ export class Akali extends Champion {
}

override qAction(): Damage[] {
const q = this.champAbilities.Q
const q = this.champAbilities.Q;
if (q.checkIfInsideBounds()) {
this.hasAssissinsMark = true
return[q.getDamage()]
this.hasAssissinsMark = true;
return [q.getDamage()];
}
return [];
}
Expand All @@ -55,6 +60,18 @@ export class Akali extends Champion {
}

override eAction(): Damage[] {
const e = this.champAbilities.E;
const { conditions } = e.dynamicData.actionConditions;
if (e.checkIfInsideBounds()) {
const firstInstance = checkCondition(conditions, AC.firstInstance);
const secondInstance = checkCondition(conditions, AC.secondInstance);
//technically works for both instances not implemented yet
this.hasAssissinsMark = true;
if (checkIfConditonExists(secondInstance, conditions, true)) {
return [e.getDamage({ ability: 0, effect: 2, leveling: 1 })];
}
return [e.getDamage()];
}
return [];
}

Expand Down

0 comments on commit 77f3f73

Please sign in to comment.