Add function to get random nature, add shiny rate to library settings
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -5,8 +5,8 @@ use std::ptr::drop_in_place;
|
||||
/// Creates a new generation 7 damage library. `has_randomness` defines whether a random damage
|
||||
/// modifier (0.85x - 1.00x) is applied to the calculated damage.
|
||||
#[no_mangle]
|
||||
extern "C" fn gen_7_damage_library_new(randomness: u8) -> IdentifiablePointer<Box<dyn DamageLibrary>> {
|
||||
let v: Box<dyn DamageLibrary> = Box::new(Gen7DamageLibrary::new(randomness == 1));
|
||||
extern "C" fn gen_7_damage_library_new(has_randomness: u8) -> IdentifiablePointer<Box<dyn DamageLibrary>> {
|
||||
let v: Box<dyn DamageLibrary> = Box::new(Gen7DamageLibrary::new(has_randomness == 1));
|
||||
let id = v.value_identifier();
|
||||
let ptr = Box::into_raw(Box::new(v));
|
||||
IdentifiablePointer::new(ptr, id)
|
||||
|
||||
Reference in New Issue
Block a user