Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Leveling Up Spell for the RPG example #1366

Open
lashiam opened this issue Aug 22, 2024 · 0 comments
Open

New Leveling Up Spell for the RPG example #1366

lashiam opened this issue Aug 22, 2024 · 0 comments

Comments

@lashiam
Copy link

lashiam commented Aug 22, 2024

Hello! I figured I should reach out to you since I don't think there's literally anyone else who can answer this question ahaaa.
but,
this is my current way to cast spells

apshop:
name: "&7Level Up! ($sp)"
description: Spend SP to Level up!
icon: totem_of_undying
inherit: false
hidden: false
actions:
cast:
- class: Selector
parameters:
confirm: true
auto_close: true
confirm_filler: stained_glass:13
placeholder_icon: gray_stained_glass_pane
show_unavailable: true
quiet: false
loud: true
limit: 100
cost_type: sp
title: "($balance&0)(AP-$ap)"
requirements:
- holding_wand: true
options:
- placeholder: true
- placeholder: true
- placeholder: true
- placeholder: true
- cast_spell: give_ap
cost: 50
cost_modifiers:
- scale: "x ^ 1.5"
type: attribute
attribute: skill_level
- placeholder: true
- placeholder: true
- placeholder: true
- placeholder: true

give_ap:
creator: MrSlushie96
creator_id: 67f4346qf-7203-4a3e-a439-ff92c2eda6c7
name: Level Up
description: Spend SP to level up!
icon: totem_of_undying{18001}
actions:
cast:
- class: CheckRequirements
requirements:
- attributes:
- attribute: skill_level
max: 100
fail:
- class: Cancel
spells:
- give_ap
actions:
- class: Command
command: mgive ap 1
op: true
- class: ModifyAttribute
attribute: skill_level
bypass_undo: true
value: "x+1"
parameters:
target: self
op: true

Basically players have to "buy" a level using the SP they have, and with that, they can go ahead and learn new spells based on their AP.
However, i'm wondering if the level up could be passive, with something along the lines of,

passive_level:
creator: MrSlushie96
creator_id: 67f4346f-7203-4a3e-a439-ff92c2eda6c7
name: Level up!
description: When you reach the right amount of SP,
you level up!
icon: scute{3}
passive: true
inherit: base_passive
toggle: none
toggleable: false
triggers:
- trigger: interval
interval: 1000
actions:
cast:
- class: ChangeContext
target_caster: true
actions:
- class: Cast
spell: give_ap
as_target: true
parameters:
target_self: true
target: self
costs:
sp: 50
cost_modifiers:
- scale: "x ^ 1.5"
type: attribute
attribute: skill_level

However, i don't think i got the cost_modifiers in the right position, or if i can even put it there in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant