Merge branch 'dev' of https://github.com/hppeng-wynn/hppeng-wynn.github.io into dev
This commit is contained in:
commit
8a7efea3a1
2 changed files with 20 additions and 9 deletions
|
@ -5,6 +5,10 @@ function checkBool(v) {
|
|||
}
|
||||
|
||||
function checkNum(v) {
|
||||
if (typeof v === 'boolean') {
|
||||
if (v) return 1;
|
||||
return 0;
|
||||
}
|
||||
if (typeof v !== 'number') throw new Error(`Expected number, but got ${typeof v}`);
|
||||
return v;
|
||||
}
|
||||
|
@ -261,6 +265,9 @@ function staticCheck(expType, term) {
|
|||
if (expType === 'any' || expType === term.type) {
|
||||
return true;
|
||||
}
|
||||
if (expType === 'number' && term.type === 'boolean') {
|
||||
return true;
|
||||
}
|
||||
throw new Error(`Expected ${expType}, but got ${term.type}`);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,19 +3,23 @@ realSpeeds = [] # TODO
|
|||
|
||||
atkSpd = 6
|
||||
|
||||
#spellCycle = [1, 2, 1, 2, 0]
|
||||
#spellDelay = [0.5, 0.5, 0.5, 0.5, 0]
|
||||
spellCycle = [-1, 1, 0, 2, 1, 1]
|
||||
spellDelay = [0.4312345, 0, 0.4, 0.4, 0.4, 0.4]
|
||||
#spellCycle = [1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 2, 2]
|
||||
#spellDelay = [0.5, 0, 0.5, 0.5, 0, 0.5, 0.5, 0, 0.5, 0.5, 0, 0.5, 0.5, 0, 0.5, 0.5, 0, 0.5, 1, 0.5]
|
||||
spellCycle = [1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2]
|
||||
spellDelay = [0.5, 0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 1, 0.5]
|
||||
#spellCycle = [-1, 1, 0, 2, 1, 1]
|
||||
#spellDelay = [0.4312345, 0, 0.4, 0.4, 0.4, 0.4]
|
||||
#spellCycle = [9, 0, 9, 0, 10, 0, 0]
|
||||
#spellDelay = [0, 1.4, 0, 1.4, 0, 1.3, 1.3]
|
||||
delayCycle = [1.2, 0, 0.4, 0.4, 0.4, 0.4]
|
||||
spellCycle = spellCycle*8
|
||||
spellDelay = spellDelay*4 + delayCycle + spellDelay*2 + delayCycle
|
||||
#delayCycle = [1.2, 0, 0.4, 0.4, 0.4, 0.4]
|
||||
#spellCycle = spellCycle*8
|
||||
#spellDelay = spellDelay*4 + delayCycle + spellDelay*2 + delayCycle
|
||||
|
||||
simulation_end = 100
|
||||
manaRegens = [5, 0, 15]
|
||||
manaSteals = [9, 13, 0]
|
||||
#manaRegens = [5, 0, 15]
|
||||
#manaSteals = [9, 13, 0]
|
||||
manaRegens = [0, 0]
|
||||
manaSteals = [8, 11]
|
||||
|
||||
import random
|
||||
import math
|
||||
|
|
Loading…
Reference in a new issue