Created
August 26, 2023 07:52
-
-
Save claytonjroberts/203bfb03c5306d6019a277ae382e234b to your computer and use it in GitHub Desktop.
Stone Script RPG Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --------------------------------------------- | |
// --- DEBUG | |
// --------------------------------------------- | |
var debug = true | |
var global_name_loadout | |
?debug | |
>`0,0,Loadout.....: @global_name_loadout@ | |
>`0,1,Foe.........: @foe.name@ | |
>`0,2,Foe Distance: @foe.distance@ | |
// --------------------------------------------- | |
// --- VARIABLES | |
// --------------------------------------------- | |
var status_hp_max = (hp = maxhp) | |
var status_hp_low = hp < 10 | |
var status_hp_critical = hp < 5 | |
var status_low_armor = armor < 1 | |
var res_need_wood = res.wood < 400 | |
var res_need_stone = res.stone < 400 | |
var have_ghost = item.GetCount("ghost") | |
// --------------------------------------------- | |
// --- LOADOUTS | |
// --------------------------------------------- | |
var it_melee_light = "sword *10 fire" | |
var it_melee_heavy = "hammer *10" | |
var it_shield = "shield *10 dashing" | |
var it_shield_dashing = "shield *10 dashing" | |
var it_ranged_light = "crossbow *10" | |
func lo_favorite() | |
global_name_loadout = "favorite" | |
// Your favorite loadout | |
equip ghost | |
func lo_ghost() | |
global_name_loadout = "ghost" | |
equip ghost | |
func lo_gather_materials() | |
global_name_loadout = "gather_materials" | |
equipL star | |
equipR @it_shield@ | |
func lo_heal() | |
global_name_loadout = "heal" | |
equipL ouroboros | |
equipR @it_shield@ | |
func lo_speed() | |
global_name_loadout = "speed" | |
equipL triskelion | |
equipR @it_shield@ | |
func lo_melee_heavy() | |
global_name_loadout = "melee_heavy" | |
// Melee attacks for armored enemies | |
equipL @it_melee_heavy@ | |
equipR @it_shield@ | |
func lo_melee_dashing() | |
global_name_loadout = "melee_dashing" | |
equipL @it_melee_light@ | |
equipR @it_shield_dashing@ | |
func lo_melee_dual() | |
global_name_loadout = "melee_dual" | |
// Melee attacks for dual-wielding | |
equipL @it_melee_light@ | |
equipR @it_melee_heavy@ | |
func lo_melee_healing() | |
global_name_loadout = "melee_healing" | |
// Melee attacks + healing | |
equipL sword *10 | |
equipR ouroboros | |
func lo_ranged_healing() | |
global_name_loadout = "ranged_healing" | |
// Ranged attacks + healing | |
equipL @it_ranged_light@ | |
equipR ouroboros | |
func lo_ranged_heavy() | |
global_name_loadout = "ranged_heavy" | |
// Ranged attacks for high HP enemies | |
equip ghost | |
func lo_ranged_light() | |
global_name_loadout = "ranged_light" | |
// Ranged attacks for low HP enemies | |
?have_ghost | |
lo_ghost() | |
: | |
equip repeating crossbow *10 | |
func lo_ranged_magic() | |
global_name_loadout = "ranged_magic" | |
equip ghost | |
// --------------------------------------------- | |
// --- Routines | |
// --------------------------------------------- | |
func routine_passive() | |
/* | |
Heal, pickup items, walk faster | |
*/ | |
?!status_hp_max | |
// Heal if we're missing health | |
lo_heal() | |
:?pickup.distance < 10 | |
// Pickup items | |
lo_gather_materials() | |
:?harvest.distance < 7 | |
// Harvest materials | |
?harvest=Boulder | |
equip shovel | |
?harvest=Tree & res_need_wood | |
equip hatchet | |
// Activate when available & in range | |
?harvest.distance <= 4 | |
^& item.GetCooldown("hatchet") <= 0 | |
activate R | |
: | |
// Nothing is occuring, just go faster | |
lo_speed() | |
func routine_combat() | |
/* | |
Fight enemies | |
*/ | |
var use_ranged = foe.distance >= 10 | |
var foe_heavy = foe.armor > 2 | |
?status_hp_critical | |
activate potion | |
?status_hp_low | |
?use_ranged | |
lo_ranged_healing() | |
: | |
lo_melee_healing() | |
: | |
?use_ranged | |
?foe_heavy | |
lo_ranged_heavy() | |
: | |
lo_ranged_light() | |
: | |
?foe_heavy | |
lo_melee_heavy() | |
: | |
lo_melee_dashing() | |
// --------------------------------------------- | |
// --- ALL LOCATIONS | |
// --------------------------------------------- | |
?foe.distance > 22 | |
routine_passive() | |
: | |
routine_combat() | |
// --------------------------------------------- | |
// --- LOCATION: Rocky Plateau | |
// --------------------------------------------- | |
?loc = rocky | |
// Boss: Dysangelos, phase 1 (base form) | |
?foe = dysangelos_bearer | |
equipL sword | |
equipR lo_fav_shield | |
// Boss: Dysangelos, phase 2 (elemental form) | |
?foe = dysangelos_elementalist | |
equipL sword | |
equipR lo_fav_shield | |
// TODO use the proper runes against | |
// the current rune in the eye of the boss | |
// Boss: Dysangels, phase 3 (perfect form) | |
?foe = dysangelos_perfected | |
equipL sword | |
equipR lo_fav_shield | |
?foe.armor > 0 | |
loadout 3 | |
// Their most powerful move deals 30 damage | |
// points on 5* difficulty, so we need to | |
// heal if we don't have enough health and | |
// armor combined | |
?(hp + armor) < 31 | |
activate potion | |
// --------------------------------------------- | |
// --- LOCATION: Deadwood Canyon | |
// --------------------------------------------- | |
?loc = deadwood | |
?foe.distance > 22 | |
routine_passive() | |
: | |
?foe = mosquito | |
?foe.distance >= 5 | |
lo_ranged_light() | |
: | |
lo_melee_dual() | |
:?foe = scarab | |
?foe.distance >= 5 | |
lo_melee_dashing() | |
: | |
lo_melee_dual() | |
:?foe = boss | foe = poena | |
// Boss: Xyaloalgia, residue of Leuce | |
// and Poena, its phase 2 | |
?status_hp_low | |
?have_ghost | |
lo_ghost() | |
: | |
lo_melee_healing() | |
:?foe.distance >= 8 | |
lo_melee_dashing() | |
: | |
lo_melee_dual() | |
// --------------------------------------------- | |
// --- LOCATION: Caves of Fear | |
// --------------------------------------------- | |
?loc = caves | |
?foe = boss // Bolesh, the cunning | |
?foe.distance > 10 | |
lo_melee_dashing() | |
: | |
lo_melee_dual() | |
// --------------------------------------------- | |
// --- LOCATION: Haunted Halls | |
// --------------------------------------------- | |
?loc = undead_crypt_boss | loc = undead_crypt | |
?foe = ghost | |
// Ghosts are immune to non-magical attacks | |
lo_ranged_magic() | |
// --------------------------------------------- | |
// --- LOCATION: Boiling Mine | |
// --------------------------------------------- | |
?loc = bronze_guardian | |
?time > 600 & foe.distance > 10 | |
// Guardian is now attackable from afar | |
lo_ranged_heavy() | |
?pos.y > 0 & foe.distance > 5 | |
// Guardian hits, we jump on its hand | |
lo_melee_dashing() | |
:?foe.distance <= 5 | |
// We are on its arm, close to its face | |
?foe.armor > 0 | |
lo_melee_heavy() | |
: | |
lo_melee_dual() | |
// --------------------------------------------- | |
// --- LOCATION: Icy Ridge | |
// --------------------------------------------- | |
?loc = icy_ridge | |
// Hrímnir | |
?foe = boss | |
?foe.distance <= 2 | |
?foe.armor > 0 | |
lo_melee_heavy() | |
: | |
lo_melee_light() | |
:?foe.distance <= 5 | |
// The shovel has an attack range of 1 | |
// so it forces the player to move very | |
// very close. So close that it can avoid | |
// the attacks (snowballs) | |
equip shovel | |
:?foe.distance > 5 | |
lo_melee_dashing() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment