Skip to content

Commit

Permalink
feat: Add some allow statements to make the compiler happy
Browse files Browse the repository at this point in the history
  • Loading branch information
wormtql committed Mar 18, 2024
1 parent e0ef71e commit be63bc7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
4 changes: 4 additions & 0 deletions mona_core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#![allow(unused_imports)]
#![allow(unused_variables)]
#![allow(unreachable_patterns)]
#![allow(clippy::approx_constant)]
#![allow(unused_mut)]
#![allow(unused_assignments)]
#![allow(dead_code)]
#![feature(decl_macro)]
#[macro_use] extern crate pest_derive;

Expand Down
5 changes: 3 additions & 2 deletions mona_dsl/source/test.mona
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dmg x = KamisatoAyaka.Normal1({ fumo: "Electro" })
dmg x=Yelan.E1 //E伤害

print("123")
result=x.normal.e //E最大期望伤害
print(result)
5 changes: 3 additions & 2 deletions mona_dsl/src/bin/test_damage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@ fn main() {

// println!("{}", code);
let character: Character<SimpleAttributeGraph2> = Character::new(
CharacterName::KamisatoAyaka,
CharacterName::Yelan,
90,
false,
0,
8, 8, 8,
&CharacterConfig::NoConfig
&CharacterConfig::NoConfig,
// &CharacterConfig::Neuvillette {current_hp: 100},
);
let weapon = Weapon::new(
WeaponName::MistsplitterReforged,
Expand Down
1 change: 1 addition & 0 deletions mona_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ lto = true
opt-level = 3
strip = true
#codegen-units = 1
#debug = true

[dependencies]
mona = { path = "../mona_core" }
Expand Down
9 changes: 4 additions & 5 deletions mona_wasm/src/bin/test_dsl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn generate_artifacts() -> Vec<Artifact> {

fn main() {
let character = Character::new(
CharacterName::KamisatoAyaka,
CharacterName::Yelan,
90,
false,
0,
Expand All @@ -43,10 +43,9 @@ fn main() {
);

let target_function: Box<dyn TargetFunction> = Box::new(TargetFunctionDSL::new(r#"
prop x = KamisatoAyaka.recharge
dmg d = KamisatoAyaka.Q1({ after_dash: true })
dmg a = KamisatoAyaka.Normal1({ after_dash: true })
result = 10 * a.n.e + d.n.e * min(x, 1.6)
dmg E=Yelan.E1 //E伤害
result=E.normal.e //E最大期望伤害
"#.trim()));

let enemy = Enemy::default();
Expand Down

0 comments on commit be63bc7

Please sign in to comment.