Itr

Struct Itr 

Source
pub struct Itr {
Show 16 fields pub kind: ItrKind, pub x: i32, pub y: i32, pub w: u32, pub h: u32, pub z_width: u32, pub d_vx: i64, pub d_vy: i64, pub a_rest: u32, pub v_rest: u32, pub fall: i32, pub b_defend: i32, pub injury: i32, pub effect: Effect, pub catching_act: FrameNumberNext, pub caught_act: FrameNumberNext,
}
Expand description

Area that hits other objects.

See https://lf-empire.de/lf2-empire/data-changing/frame-elements/174-itr-interaction?start=1

Fields§

§kind: ItrKind

Interaction variants.

§x: i32

X coordinate.

§y: i32

Y coordinate.

§w: u32

Width.

§h: u32

Height.

§z_width: u32

Z Width extends in both directions + 1 center pixel.

zwidth: 10 means 10 pixels up, 10 pixels down, and one pixel for center of the shadow for 21 pixels total.

§d_vx: i64

Acceleration to place on the hit object in the X axis.

§Notes

  • itr/kind:8 (ItrKind::HealBall) uses this as the frame number for the object with this Itr to switch to when hitting a character.
§d_vy: i64

Acceleration to place on the hit object in the Y axis.

§a_rest: u32

Delay before another hit may happen, restricts this Itr to one object.

§v_rest: u32

Delay before another hit may happen, allows multiple objects to be hit.

§fall: i32

How much a character is “off balance”.

The fall value determines how an attacked character will react to this itr by flinching, getting into the stunned frames, or falling. If no value is specified, the default of 20 will be used.

  • If a character accumulates 20 fall points, he switches to injured1 (220).
  • If a character accumulates 40 fall points, he switches to injured2 (222) or injured2back (224) depending on the direction he is hit, and will fall if he is in mid-air.
  • If a character accumulates 60 fall points, he switches into the stunned (226) frames where he can be grabbed or hit by super_punch.

Attacks with fall: 41 or more can hit falling characters.

Here are a few values as a rule of thumb for various fall values:

fallDescription
-1Does not go into injured frames and harder to knockdown.
1Never stun, never fall (Davis DvA shrafe)
203 hit stun, 4 hit fall
252 hit stun, 3 hit fall (Dennis normal kick)
40Does not stun, 2 hit fall (baseball bat normal swing)
601 hit stun, 2 hit fall (Henry’s arrow)
701 hit fall

Every 1 TU, a fall point is deducted.

§b_defend: i32

Broken-defence points.

bdefend points determine if a character is able to block an attack by defending or if he will go to the broken-defense-frames. As long as he has 30 or less Bdefend-points, he will be able to block the attack, if it’s 31 or higher, he goes to the broken-defense-frames. If an itr hits the character while he is not in the defend-frames, his bdefend counter will automatically increase to 45. If you have, for example, accumulated 31 points and get hit during your defense (assuming you have specified a positive bdefend value in the hitting itr), the character will go to the broken-defense-frames.

Here are some common values for various bdefend values:

bdefendDescription
0never breaks defense (ex: John’s D>J shield)
124 hit break
163 hit break
302 hit break
601 hit break
100ignores defense, sets bdefend counter to 45,\
and instantly destroys weapons.

Every 1 TU, a bdefend point is deducted, so he will be able to recover his defense.

Armor will function as long as a character has not accumulated more bdefend points than the specific armor points of Louis(1), Knight or Julian(15) at the time of attack. For example, Julian can resist a dash attack(bdefend 60) even though he only has 15 armor points, but he will be left completely vulnerable for the next 45 TU until he regains his 1st armor point.

§injury: i32

Amount of damage to inflict on the target object.

§Notes

§effect: Effect

Itr effect variants.

§catching_act: FrameNumberNext

Frame numbers for where the catching object should switch to.

Used in itr/kind: 1 (ItrKind::CatchStunned) and itr/kind: 3 (ItrKind::CatchForce).

§caught_act: FrameNumberNext

Frame numbers for where the caught character should switch to.

Used in itr/kind: 1 (ItrKind::CatchStunned) and itr/kind: 3 (ItrKind::CatchForce).

Implementations§

Source§

impl Itr

Source

pub const Z_WIDTH_DEFAULT: u32 = 13u32

Default Z_WIDTH for Itr volumes.

Trait Implementations§

Source§

impl Clone for Itr

Source§

fn clone(&self) -> Itr

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Itr

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for Itr

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Itr

Source§

fn eq(&self, other: &Itr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'i> TryFrom<Pair<'i, Rule>> for Itr

Source§

type Error = Error<'i>

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

fn try_from(pair: Pair<'i, Rule>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for Itr

Source§

impl Eq for Itr

Source§

impl StructuralPartialEq for Itr

Auto Trait Implementations§

§

impl Freeze for Itr

§

impl RefUnwindSafe for Itr

§

impl Send for Itr

§

impl Sync for Itr

§

impl Unpin for Itr

§

impl UnwindSafe for Itr

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.