pub trait ResourceOps {
Show 17 methods
// Required methods
fn gain_resource(&mut self, amount: f64) -> f64;
fn gain_resource_from(
&mut self,
amount: f64,
source: ResourceGainSource,
) -> f64;
fn gain_unmodified_resource_from(
&mut self,
amount: f64,
source: ResourceGainSource,
) -> f64;
fn gain_secondary_resource(&mut self, amount: f64) -> f64;
fn gain_secondary_resource_from(
&mut self,
amount: f64,
source: ResourceGainSource,
) -> f64;
fn primary_pet_resource(&self) -> Option<PetResourceBinding>;
fn gain_pet_resource(
&mut self,
binding: PetResourceBinding,
amount: f64,
) -> f64;
fn spend_secondary_resource(&mut self, amount: f64) -> bool;
fn spend_all_secondary_resource(&mut self, cost: f64) -> f64;
fn secondary_resource(&self) -> f64;
fn primary_resource(&self) -> f64;
fn primary_resource_max(&self) -> f64;
fn primary_resource_fraction(&self) -> f64;
fn spell_resource_cost(&self, spell: LocalSpellIdx) -> f64;
fn last_primary_spent(&self) -> f64;
fn last_optional_primary_spent(&self) -> f64;
fn last_secondary_spent(&self) -> f64;
}Expand description
Player and persistent-pet resource operations.