// // Event Handlers // static void _GhostAttacked(object sender, CritterAttackedEventArgs e) { var ghost = sender as Critter; // regenerate HP ghost.Stat[Stats.CurrentHP] = ghost.Stat[Stats.MaxLife]; // scream to scary player ghost.SayMsg(Say.ShoutOnHead, TextMsg.Dlg, TextMsg.DlgStr(Dialogs.Ghost, Str.Scream)); // do nothing after attack e.PreventDefaults(); }
// // Event Handlers // static void _GhostAttacked(object sender, CritterAttackedEventArgs e) { var ghost = sender as Critter; // regenerate HP ghost.Stat[Stats.CurrentHP] = ghost.Stat[Stats.MaxLife]; // scream to scary player ghost.SayMsg(Say.ShoutOnHead, TextMsg.Dlg, TextMsg.DlgStr(Dialogs.Ghost, Str.Scream)); // do nothing after attack e.PreventDefaults(); }