pub enum CombatCommand {
Show 19 variants
AddCombatant {
combatant: Combatant,
},
AddMonsters {
monster: Uuid,
count: u16,
roll: bool,
},
RemoveCombatant {
combatant: Uuid,
},
RollInitiative {
combatant: Uuid,
roll: Option<u8>,
},
RollInitiativeForAll,
SetInitiative {
combatant: Uuid,
total: i16,
},
Start,
NextTurn,
Damage {
combatant: Uuid,
amount: u32,
},
Heal {
combatant: Uuid,
amount: u32,
},
SetTemporaryHitPoints {
combatant: Uuid,
amount: u16,
},
AddEffect {
effect: NewEffect,
},
RemoveEffect {
effect: Uuid,
},
CastSpell {
caster: Uuid,
spell: String,
slot: Option<SpellSlot>,
targets: Vec<Uuid>,
concentration: Option<Uuid>,
},
UseFeature {
combatant: Uuid,
feature: String,
amount: u16,
},
Pause,
Resume,
End,
Undo {
command: Option<Uuid>,
},
}Expand description
What a participant wants to happen. Turned into events by decide.
Variants§
AddCombatant
Join the combat, at any point. If initiative is already set the
combatant slots straight into the turn order.
AddMonsters
Add count of a monster from the campaign’s monsters, named and
numbered on from any already in the fight (“Goblin 3”), at their
maximum hit points or, with roll, rolled. Only the server can
decide this (it needs the stat block and dice); see
super::add_monsters.
RemoveCombatant
RollInitiative
Roll d20 + modifier. Pass roll when the player rolled physical
dice; leave it out to have the server roll.
RollInitiativeForAll
Server rolls for everyone who hasn’t got initiative yet.
SetInitiative
Start
NextTurn
Damage
Heal
SetTemporaryHitPoints
AddEffect
RemoveEffect
CastSpell
Record a spell cast in the log. The slot is spent on the caster’s
character sheet, separately; slot says which, for the record.
For a concentration spell, concentration is the id of the effect
that puts it into play on its targets (ending the caster’s previous
concentration).
Fields
UseFeature
Use a limited feature (Rage, Action Surge…). For a character, the combat service spends the uses on their sheet first.
Pause
Interrupt an active combat. While paused, only Resume and End
are accepted.
Resume
End
Undo
Take back one of the sender’s own earlier commands: command, or
when that’s left out, their latest one not yet undone. Only the
server can decide this (it needs the log); see super::undo.
Implementations§
Source§impl CombatCommand
impl CombatCommand
Sourcepub fn sheet_cost(&self) -> Option<(Uuid, SheetCost)>
pub fn sheet_cost(&self) -> Option<(Uuid, SheetCost)>
What running this costs the sheet of which combatant, if anything.
Trait Implementations§
Source§impl Clone for CombatCommand
impl Clone for CombatCommand
Source§fn clone(&self) -> CombatCommand
fn clone(&self) -> CombatCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ComposeSchema for CombatCommand
impl ComposeSchema for CombatCommand
Source§impl Debug for CombatCommand
impl Debug for CombatCommand
Source§impl<'de> Deserialize<'de> for CombatCommand
impl<'de> Deserialize<'de> for CombatCommand
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for CombatCommand
impl PartialEq for CombatCommand
Source§fn eq(&self, other: &CombatCommand) -> bool
fn eq(&self, other: &CombatCommand) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for CombatCommand
impl Serialize for CombatCommand
Source§impl ToSchema for CombatCommand
impl ToSchema for CombatCommand
impl Eq for CombatCommand
impl StructuralPartialEq for CombatCommand
Auto Trait Implementations§
impl Freeze for CombatCommand
impl RefUnwindSafe for CombatCommand
impl Send for CombatCommand
impl Sync for CombatCommand
impl Unpin for CombatCommand
impl UnsafeUnpin for CombatCommand
impl UnwindSafe for CombatCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.