pub struct AdventureLog(_);
Expand description

Adventure log helper

Implementations§

source§

impl AdventureLog

source

pub unsafe fn get() -> Self

Returns an internal reference to the adventure log. Note that this isn’t a reference to the actual struct in memory (yet).

Safety

This is unsafe, since it essentially borrows a global variable mutably, see safety rules for static muts.

source

pub fn set_struct_location(&mut self)

Sets the location of the adventure log struct in memory.

Sets it in a static memory location.

source

pub fn clear_struct(&mut self)

Clears the adventure log structure.

source

pub fn get_dungeon_floor(&self) -> dungeon_floor_pair

Returns the current dungeon floor pair.

source

pub fn set_dungeon_floor(&mut self, dungeon_floor: dungeon_floor_pair)

Sets the current dungeon floor pair.

source

pub fn is_entry_completed(&self, entry_id: u32) -> bool

Checks if one adventure log entry is completed.

source

pub fn mark_entry_completed(&mut self, entry_id: u32)

Marks one of the adventure log entry as completed.

source

pub fn is_empty(&self) -> bool

Checks if none of of the adventure log entry is completed.

source

pub fn get_number_dungeons_cleared(&self) -> u32

Gets the number of dungeons cleared.

source

pub fn increment_number_dungeons_cleared()

Increments by 1 the number of dungeons cleared.

source

pub fn get_number_friend_rescues(&self) -> u32

Gets the number of successful friend rescues.

source

pub fn increment_number_friend_rescues(&mut self)

Increments by 1 the number of successful friend rescues.

source

pub fn get_number_evolutions(&self) -> u32

Gets the number of evolutions.

source

pub fn increment_number_evolutions(&mut self)

Increments by 1 the number of evolutions.

source

pub fn increment_number_steals(&mut self)

Leftover from Time & Darkness. Does not do anything.

Calls to this matches the ones for incrementing the number of successful steals in Time & Darkness.

source

pub fn get_number_eggs_hatched(&self) -> u32

Gets the number of eggs hatched.

source

pub fn increment_number_eggs_hatched(&mut self)

Increments by 1 the number of eggs hatched.

source

pub fn get_number_monsters_joined(&self) -> u32

Gets the number of different monsters that joined.

source

pub fn get_number_moves_learned(&self) -> u32

Gets the number of different moves learned.

source

pub fn get_victories_on_one_floor(&self) -> u32

Gets the record of victories on one floor.

source

pub fn set_victories_on_one_floor(&mut self, victories: u32)

Sets the record of victories on one floor.

source

pub fn get_number_monsters_battled(&self) -> u32

Gets the number of different monsters that battled against you.

source

pub fn set_monster_battled(&mut self, monster_id: MonsterSpeciesId)

Marks one monster as battled.

source

pub fn set_monster_joined(&mut self, monster_id: MonsterSpeciesId)

Marks one monster as joined.

source

pub fn get_number_big_treasure_wins(&self) -> u32

Gets the number of big treasure wins.

source

pub fn increment_number_of_big_treasure_wins()

Increments by 1 the number of big treasure wins.

source

pub fn set_number_big_treasure_wins(&mut self, number: u32)

Sets the number of big treasure wins.

source

pub fn get_number_recycled(&mut self) -> u32

Gets the number of items recycled.

source

pub fn set_number_recycled(&mut self, number: u32)

Sets the number of items recycled.

source

pub fn get_number_sky_gifts_sent(&self) -> u32

Gets the number of Sky Gifts sent.

source

pub fn increment_number_of_gifts_sent()

Increments by 1 the number of sky gifts sent.

source

pub fn set_number_sky_gifts_sent(&mut self, number: u32)

Sets the number of Sky Gifts sent.

source

pub fn compute_special_counters(&mut self)

Computes the counters from the bit fields in the adventure log, as they are not updated automatically when bit fields are altered.

Affects Self::get_number_monsters_joined, Self::get_number_moves_learned, Self::get_number_monsters_battled and Self::get_number_items_acquired.

source

pub fn set_special_monster_recruited(&mut self, monster_id: MonsterSpeciesId)

Marks a specified special monster as recruited in the adventure log.

source

pub fn get_number_fainted(&self) -> u32

Gets the number of times the player fainted.

source

pub fn increment_number_of_fainted()

Increments by 1 the number of times the player fainted.

source

pub fn get_number_items_acquired(&self) -> u32

Gets the number of items acquired.

source

pub fn set_item_acquired(&mut self, item_id: ItemId)

Marks one specific item as acquired.

source

pub fn set_challenge_letter_cleared(&mut self, challenge_letter: u32)

Sets a challenge letter as cleared.

source

pub fn get_sentry_duty_game_points(&self, rank: SentryGameRank) -> u32

Gets the points for the associated rank in the footprints minigame.

source

pub fn set_sentry_duty_game_points( &mut self, points: u32 ) -> Option<SentryGameRank>

Sets the points for the associated rank in the footprints minigame.

Auto Trait Implementations§

§

impl RefUnwindSafe for AdventureLog

§

impl Send for AdventureLog

§

impl Sync for AdventureLog

§

impl Unpin for AdventureLog

§

impl UnwindSafe for AdventureLog

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Az for T

source§

fn az<Dst>(self) -> Dstwhere T: Cast<Dst>,

Casts the value.
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
source§

impl<Src, Dst> CastFrom<Src> for Dstwhere Src: Cast<Dst>,

source§

fn cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> CheckedAs for T

source§

fn checked_as<Dst>(self) -> Option<Dst>where T: CheckedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere Src: CheckedCast<Dst>,

source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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<Src, Dst> LosslessTryInto<Dst> for Srcwhere Dst: LosslessTryFrom<Src>,

source§

fn lossless_try_into(self) -> Option<Dst>

Performs the conversion.
source§

impl<Src, Dst> LossyInto<Dst> for Srcwhere Dst: LossyFrom<Src>,

source§

fn lossy_into(self) -> Dst

Performs the conversion.
source§

impl<T> OverflowingAs for T

source§

fn overflowing_as<Dst>(self) -> (Dst, bool)where T: OverflowingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere Src: OverflowingCast<Dst>,

source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> SaturatingAs for T

source§

fn saturating_as<Dst>(self) -> Dstwhere T: SaturatingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere Src: SaturatingCast<Dst>,

source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.
source§

impl<T> UnwrappedAs for T

source§

fn unwrapped_as<Dst>(self) -> Dstwhere T: UnwrappedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere Src: UnwrappedCast<Dst>,

source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> WrappingAs for T

source§

fn wrapping_as<Dst>(self) -> Dstwhere T: WrappingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere Src: WrappingCast<Dst>,

source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.