Skip to main content

MoveDef

Struct MoveDef 

Source
pub struct MoveDef {
Show 33 fields pub id: MoveId, pub startup: u8, pub active: u8, pub recovery: u8, pub damage: i32, pub chip: i32, pub hitstun: u8, pub blockstun: u8, pub hitstop: u8, pub blockstop: u8, pub pushback_hit: i32, pub pushback_block: i32, pub level: HitLevel, pub knockdown: bool, pub launch: i32, pub cancel: CancelRule, pub invuln: Invuln, pub hitboxes: &'static [TimedBox], pub vel_x: i32, pub vel_frames: u8, pub vel_y: i32, pub gravity_override: Option<i32>, pub land_recovery: u8, pub projectile: Option<ProjectileDef>, pub projectile_guard: bool, pub meter_on_hit: i32, pub meter_cost: i32, pub gauge_cost: i32, pub throw: ThrowKind, pub followups: &'static [Followup], pub feintable: bool, pub pass_through: bool, pub channel: Option<ChannelDef>,
}

Fields§

§id: MoveId§startup: u8§active: u8§recovery: u8§damage: i32§chip: i32§hitstun: u8§blockstun: u8§hitstop: u8§blockstop: u8§pushback_hit: i32§pushback_block: i32§level: HitLevel§knockdown: bool§launch: i32§cancel: CancelRule§invuln: Invuln§hitboxes: &'static [TimedBox]§vel_x: i32

Horizontal velocity applied on frame 0 (dash attacks, DP rise).

§vel_frames: u8

Frames the horizontal velocity lasts on the ground. 0 = whole move.

§vel_y: i32§gravity_override: Option<i32>§land_recovery: u8

Extra landing recovery if this move leaves the ground (the uppercut tax).

§projectile: Option<ProjectileDef>§projectile_guard: bool

Active hitboxes on this move destroy opposing projectiles.

§meter_on_hit: i32§meter_cost: i32§gauge_cost: i32

Character gauge spent on start (EX, revolver chambers).

§throw: ThrowKind§followups: &'static [Followup]§feintable: bool

FL+ST during startup cancels this special to nothing.

§pass_through: bool

Movement special that passes through the opponent’s pushbox.

§channel: Option<ChannelDef>

Implementations§

Source§

impl MoveDef

Source

pub fn total_frames(&self) -> u16

Source

pub fn first_active(&self) -> u16

Source

pub fn last_active(&self) -> u16

Source

pub fn is_active(&self, frame: u16) -> bool

Source

pub fn in_startup(&self, frame: u16) -> bool

Source

pub fn in_recovery(&self, frame: u16) -> bool

Source

pub fn finished(&self, frame: u16) -> bool

Source

pub fn advantage_on_hit(&self) -> i32

Advantage if the move connects on its first active frame.

Source

pub fn advantage_on_block(&self) -> i32

Source

pub fn hitboxes_on(&self, frame: u16) -> impl Iterator<Item = LocalBox> + '_

Source

pub fn followup_for(&self, button: Btn, frame: u16) -> Option<MoveId>

Source

pub fn is_throw(&self) -> bool

Source

pub fn special(id: MoveId) -> Self

Reasonable defaults for a special: everything off, no boxes.

Trait Implementations§

Source§

impl Clone for MoveDef

Source§

fn clone(&self) -> MoveDef

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MoveDef

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.