pub enum ActionAst {
Show 49 variants
Show(String),
AddSpinnerWedge {
spinner: String,
width: usize,
text: String,
},
AddFlag(String),
AddSeqFlag {
name: String,
end: Option<u8>,
},
AwardPoints {
amount: i64,
reason: String,
},
DamagePlayer {
amount: u32,
turns: Option<usize>,
cause: String,
},
HealPlayer {
amount: u32,
turns: Option<usize>,
cause: String,
},
RemovePlayerEffect {
cause: String,
},
DamageNpc {
npc: String,
amount: u32,
turns: Option<usize>,
cause: String,
},
HealNpc {
npc: String,
amount: u32,
turns: Option<usize>,
cause: String,
},
RemoveNpcEffect {
npc: String,
cause: String,
},
RemoveFlag(String),
ReplaceItem {
old_sym: String,
new_sym: String,
},
ReplaceDropItem {
old_sym: String,
new_sym: String,
},
ModifyItem {
item: String,
patch: ItemPatchAst,
},
ModifyRoom {
room: String,
patch: RoomPatchAst,
},
ModifyNpc {
npc: String,
patch: NpcPatchAst,
},
SpawnItemIntoRoom {
item: String,
room: String,
},
DespawnItem(String),
DespawnNpc(String),
ResetFlag(String),
AdvanceFlag(String),
SetBarredMessage {
exit_from: String,
exit_to: String,
msg: String,
},
RevealExit {
exit_from: String,
exit_to: String,
direction: String,
},
LockExit {
from_room: String,
direction: String,
},
UnlockExit {
from_room: String,
direction: String,
},
LockItem(String),
UnlockItemAction(String),
PushPlayerTo(String),
GiveItemToPlayer {
npc: String,
item: String,
},
SpawnItemInInventory(String),
SpawnItemCurrentRoom(String),
SpawnItemInContainer {
item: String,
container: String,
},
SpawnNpcIntoRoom {
npc: String,
room: String,
},
SetItemDescription {
item: String,
text: String,
},
SetItemMovability {
item: String,
movability: MovabilityAst,
},
NpcSays {
npc: String,
quote: String,
},
NpcSaysRandom {
npc: String,
},
NpcRefuseItem {
npc: String,
reason: String,
},
SetNpcActive {
npc: String,
active: bool,
},
SetNpcState {
npc: String,
state: String,
},
DenyRead(String),
SetContainerState {
item: String,
state: Option<String>,
},
SpinnerMessage {
spinner: String,
},
ScheduleIn {
turns_ahead: usize,
actions: Vec<ActionStmt>,
note: Option<String>,
},
ScheduleOn {
on_turn: usize,
actions: Vec<ActionStmt>,
note: Option<String>,
},
ScheduleInIf {
turns_ahead: usize,
condition: Box<ConditionAst>,
on_false: Option<OnFalseAst>,
actions: Vec<ActionStmt>,
note: Option<String>,
},
ScheduleOnIf {
on_turn: usize,
condition: Box<ConditionAst>,
on_false: Option<OnFalseAst>,
actions: Vec<ActionStmt>,
note: Option<String>,
},
Conditional {
condition: Box<ConditionAst>,
actions: Vec<ActionStmt>,
},
}Expand description
Minimal action variants.
Variants§
Show(String)
Show a message to the player.
AddSpinnerWedge
Add a weighted wedge to a spinner
AddFlag(String)
Add a simple flag by name.
AddSeqFlag
Add a sequence flag by name with optional limit (end)
AwardPoints
Award points to the player’s score with a reason string.
DamagePlayer
Damage the player once or over multiple turns.
HealPlayer
Heal the player once or over multiple turns.
RemovePlayerEffect
Remove a queued health effect from the player by cause.
DamageNpc
Damage an NPC once or over multiple turns.
HealNpc
Heal an NPC once or over multiple turns.
RemoveNpcEffect
Remove a queued health effect from an NPC by cause.
RemoveFlag(String)
Remove a flag by name.
ReplaceItem
Replace an item instance by symbol with another
ReplaceDropItem
Replace an item when dropped with another symbol
ModifyItem
Apply an item patch to mutate fields atomically.
ModifyRoom
Apply a room patch to mutate room fields atomically.
ModifyNpc
Apply an NPC patch to mutate npc fields atomically.
SpawnItemIntoRoom
Spawn an item into a room.
DespawnItem(String)
Despawn an item.
DespawnNpc(String)
Despawn an NPC
ResetFlag(String)
Reset a sequence flag to step 0.
AdvanceFlag(String)
Advance a sequence flag by one step.
SetBarredMessage
Set a barred message for an exit between rooms
RevealExit
Reveal an exit in a room in a direction to another room.
LockExit
Lock or unlock exits and items
UnlockExit
LockItem(String)
UnlockItemAction(String)
PushPlayerTo(String)
Push player to a room.
GiveItemToPlayer
NPC gives an item to the player
SpawnItemInInventory(String)
Spawns
SpawnItemCurrentRoom(String)
SpawnItemInContainer
SpawnNpcIntoRoom
SetItemDescription
Set description for an item by symbol.
SetItemMovability
Set movability for an item by symbol.
NpcSays
NpcSaysRandom
NpcRefuseItem
NPC refuses an item with a reason
SetNpcActive
Set NPC active/inactive for movement
SetNpcState
DenyRead(String)
SetContainerState
Set container state for an item by symbol; omit state to clear
SpinnerMessage
Show a random message from a spinner
ScheduleIn
Schedules without conditions
ScheduleOn
ScheduleInIf
Schedule actions at turns ahead if a condition holds.
ScheduleOnIf
Schedule actions on an absolute turn if a condition holds.
Conditional
Conditionally execute nested actions when the condition evaluates true at runtime.