This post will detail the grammar and the scripting language (working name FFscript).
New grammar:
New sample script:Code:action action -> string actionBlock actionBlock -> precast actionBlock -> gcd actionBlock -> ogcd actionBlock+ actionBlock+ -> actionBlock+ actionBlock actionBlock+ -> actionBlock actionBlocks (Nullable) actionBlocks -> actionBlocks -> actionBlock+ actions (Nullable) actions -> action actions -> action , actions actions -> actionStatement actionStatement -> ( conditionals ) { actions } actionStatement -> comment actionStatement+ actionStatement+ -> actionStatement+ actionStatement actionStatement+ -> actionStatement actionStatements (Nullable) actionStatements -> actionStatements -> actionStatement+ actionVar actionVar -> nextaction actorListStatement actorListStatement -> playersAdd actorListStatement -> targetsAdd actorStatement actorStatement -> actor . actorVar = val actorVar actorVar -> class actorVar -> attrVar actorVar -> autoattack actorVar -> auraVar actorVar -> gcdVar actorVar -> cdVar actorVar -> actionVar attribute attribute -> str attribute -> dex attribute -> sks attribute -> det attribute -> chr attrVar attrVar -> attr . attribute auraVar auraVar -> aura . string . remaining auraVar -> aura . string boolVar boolVar -> actor . actorVar boolVar -> sim . simVar cdVar cdVar -> cd . string conditional conditional -> boolVar conditional -> notBoolVar conditional -> testVar conditionals (Nullable) conditionals -> conditional conditionals -> conditional & conditionals conditionals -> gcd gcd -> [ actor . GCD ] actionStatements gcdVar gcdVar -> lastgcd gcdVar -> nextgcd notBoolVar notBoolVar -> ! boolVar ogcd ogcd -> [ actor . OGCD ] actionStatements playersAdd playersAdd -> *players+= actor precast precast -> [ actor . PRECAST ] actionStatements script script -> setup actionBlocks script' script' -> script EOF setup setup -> [SETUP] setupStatements setupStatement setupStatement -> actorStatement setupStatement -> actorListStatement setupStatement -> simStatement setupStatement -> comment setupStatement+ setupStatement+ -> setupStatement+ setupStatement setupStatement+ -> setupStatement setupStatements (Nullable) setupStatements -> setupStatements -> setupStatement+ simStatement simStatement -> sim . simVar = val simVar simVar -> duration simVar -> execute simVar -> diagnostic simVar -> trials simVar -> output targetsAdd targetsAdd -> *targets+= actor test test -> == test -> != test -> < test -> <= test -> > test -> >= testVar testVar -> boolVar test val val val -> boolean val -> number val -> string val -> stringLit
Code:[SETUP] #sets up an alias for our player *players+=p1 #sets up an alias for our target *targets+=t1 #load skills and traits p1.class = drg # setup attributes # nonlisted attributes are assumed to be 0 p1.attr.wd=72 p1.attr.str=905 p1.attr.dex=220 p1.attr.vit=658 p1.attr.int=96 p1.attr.mnd=140 p1.attr.pie=163 p1.attr.acc=601 p1.attr.chr=593 p1.attr.det=381 p1.attr.sks=607 p1.attr.sps=354 p1.attr.aapotency=67.22 p1.attr.aadelay=2.8 # autoattack, dumbass p1.autoattack = true # setup server variables sim.duration=210 # execute is duration from end of sim sim.execute=40 # setup diagnostic or no - diagnostic runs 1 run with log output, for testing your rotation sim.diagnostic=false # otherwise setup sim trials sim.trials=10000 # i/o sim.output="output.txt" [p1.PRECAST] (){heavy_thrust, battle_litany, blood_for_blood, impulse_drive, draconian_potion_of_strength, disembowel, internal_release, blood_of_the_dragon, chaos_thrust, power_surge, leg_sweep} [p1.GCD] (p1.aura.enhanced_wheeling_thrust){wheeling_thrust} (p1.aura.sharper_fang_and_claw){fang_and_claw} (p1.aura.heavy_thrust.remaining<4.0){heavy_thrust} (t1.aura.phlebotomize.remaining<4.0){phlebotomize} (t1.aura.chaos_thrust.remaining<6.0){impulse_drive, disembowel, chaos_thrust} (){true_thrust, vorpal_thrust, full_thrust} [p1.OGCD] # don't cast any actions if it will clip (p1.nextgcd<1.0){} # use botd on cd when next ability will proc 4th (!p1.aura.blood_of_the_dragon&!p1.cd.blood_of_the_dragon&p1.nextaction==chaos_thrust){blood_of_the_dragon} (!p1.aura.blood_of_the_dragon&!p1.cd.blood_of_the_dragon&p1.nextaction==full_thrust){blood_of_the_dragon} # use geirskogul if we have bfb and botd is > 22 sec or botd cd is < 14 sec (p1.aura.blood_of_the_dragon.remaining>=22.0&!p1.cd.geirskogul&p1.aura.blood_for_blood){geirskogul} (!p1.cd.geirskogul&p1.aura.blood_of_the_dragon&p1.cd.blood_of_the_dragon.remaining<=14.0&p1.aura.blood_for_blood){geirskogul} # if we don't have bfb, use geirskogul unless the cd for bfb is <20 sec away (!p1.cd.geirskogul&p1.aura.blood_of_the_dragon.remaining>=22.0&p1.cd.blood_for_blood.remaining>=20.0){geirskogul} (!p1.cd.geirskogul&p1.aura.blood_of_the_dragon&p1.cd.blood_of_the_dragon.remaining<=14.0&p1.cd.blood_for_blood.remaining>=20.0){geirskogul} # use dps cooldowns on cooldown (!p1.cd.blood_for_blood){blood_for_blood} (!p1.cd.internal_release){internal_release} (!p1.cd.draconian_potion_of_strength){draconian_potion_of_strength} # use life surge on ft, wt, or f/c (!p1.cd.life_surge&p1.nextaction==full_thrust){life_surge} (!p1.cd.life_surge&p1.aura.enhanced_wheeling_thrust){life_surge} (!p1.cd.life_surge&p1.aura.sharper_fang_and_claw){life_surge} # use power surge right before jump (!p1.cd.jump&!p1.cd.power_surge){power_surge} (!p1.cd.jump){jump} # use all other ogcd's on cd (!p1.cd.spineshatter_dive){spineshatter_dive} (!p1.cd.dragonfire_dive){dragonfire_dive} (!p1.cd.leg_sweep){leg_sweep} # note I didn't put in mercy stroke here - it will be added later when marauder abilities are added


Reply With Quote

