()
| 916 | } |
| 917 | |
| 918 | private getMagicCountdownTime(): number{ |
| 919 | var time: number = 0; |
| 920 | |
| 921 | // If we have the sorceress hat, the base time is 50 |
| 922 | if(this.getGame().isEquipped("hat", "eqItemHatSorceressHat")) |
| 923 | time = 50; |
| 924 | // Else, it's 80 |
| 925 | else |
| 926 | time = 80; |
| 927 | |
| 928 | // Reduce the time thanks to the magic gift |
| 929 | time -= time * (Saving.loadNumber("gameGiftMagic")*15/100); |
| 930 | |
| 931 | // Set the time to 0 if it is < 0 (which shouldn't happen anyway, but you know, since some people will probably modify the game variables by themselves it's better if we try to avoid bugs) |
| 932 | if(time < 0) time = 0; |
| 933 | |
| 934 | // Return the time |
| 935 | return time; |
| 936 | } |
| 937 | } |
no test coverage detected