1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! Room buff plugin for temporary buff/debuff management
//!
//! # Features
//!
//! - Configurable buff database
//! - Multiple buff durations (permanent, room-scoped, turn-based)
//! - Various buff effects (attack, defense, HP regen, drop rate)
//! - Event-driven architecture
//! - Customizable buff effects via hooks
//! - Automatic buff expiration
//!
//! # Example
//!
//! ```ignore
//! use issun::prelude::*;
//! use issun::plugin::room_buff::*;
//!
//! // Custom buff hook
//! struct MyBuffHook;
//!
//! #[async_trait]
//! impl RoomBuffHook for MyBuffHook {
//! async fn on_buff_applied(&self, buff: &ActiveBuff, resources: &mut ResourceContext) {
//! match &buff.config.effect {
//! BuffEffect::AttackBonus(n) => { /* Apply bonus */ }
//! _ => {}
//! }
//! }
//! }
//!
//! // Create buff database
//! let database = RoomBuffDatabase::new()
//! .with_buff("attack_boost", BuffConfig {
//! id: "attack_boost".to_string(),
//! name: "Attack Boost".to_string(),
//! duration: BuffDuration::UntilRoomExit,
//! effect: BuffEffect::AttackBonus(5),
//! });
//!
//! // Register plugin
//! let game = GameBuilder::new()
//! .with_plugin(RoomBuffPlugin::new()
//! .with_database(database)
//! .with_hook(MyBuffHook)
//! )
//! .build()
//! .await?;
//!
//! // Apply buff via events
//! bus.publish(BuffApplyRequested { buff_id: "attack_boost".to_string() });
//! ```
// Re-exports
pub use *;
pub use ;
pub use RoomBuffPlugin;
pub use BuffService;
pub use BuffSystem;
pub use ;