From 346be973a60c504c18c6bd2fd80549b5cc48ebce Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Sun, 22 Jan 2023 17:32:31 -0500 Subject: [PATCH] Add override annotations on iLiving hierarchy --- src/universe/creature.hpp | 46 +++++++++++++++++------------------ src/universe/party.hpp | 50 +++++++++++++++++++-------------------- src/universe/pc.hpp | 48 ++++++++++++++++++------------------- 3 files changed, 72 insertions(+), 72 deletions(-) diff --git a/src/universe/creature.hpp b/src/universe/creature.hpp index 69395314..15c9517b 100644 --- a/src/universe/creature.hpp +++ b/src/universe/creature.hpp @@ -34,31 +34,31 @@ public: cCreature(); cCreature(int num); - void heal(int how_much); - void poison(int how_much); - void cure(int how_much); - void acid(int how_much); - void curse(int how_much); - void slow(int how_much); - void web(int how_much); - void disease(int how_much); - void dumbfound(int how_much); - void scare(int how_much); - void sleep(eStatus type, int how_much, int adj); - void avatar(); - void drain_sp(int how_much, bool allow_resist); - void restore_sp(int how_much); + void heal(int how_much) override; + void poison(int how_much) override; + void cure(int how_much) override; + void acid(int how_much) override; + void curse(int how_much) override; + void slow(int how_much) override; + void web(int how_much) override; + void disease(int how_much) override; + void dumbfound(int how_much) override; + void scare(int how_much) override; + void sleep(eStatus type, int how_much, int adj) override; + void avatar() override; + void drain_sp(int how_much, bool allow_resist) override; + void restore_sp(int how_much) override; - int get_health() const; - int get_magic() const; - int get_level() const; + int get_health() const override; + int get_magic() const override; + int get_level() const override; - bool is_alive() const; - bool is_friendly() const; - bool is_friendly(const iLiving& other) const; - bool is_shielded() const; - int get_shared_dmg(int base_dmg) const; - location get_loc() const; + bool is_alive() const override; + bool is_friendly() const override; + bool is_friendly(const iLiving& other) const override; + bool is_shielded() const override; + int get_shared_dmg(int base_dmg) const override; + location get_loc() const override; int magic_adjust(int base); diff --git a/src/universe/party.hpp b/src/universe/party.hpp index a9904a9f..55e75374 100644 --- a/src/universe/party.hpp +++ b/src/universe/party.hpp @@ -153,33 +153,33 @@ public: void import_legacy(legacy::pc_record_type(& old)[6]); bool is_in_scenario() const; - bool is_alive() const; - bool is_friendly() const; - bool is_friendly(const iLiving& other) const; - bool is_shielded() const; - int get_shared_dmg(int base_dmg) const; - location get_loc() const; + bool is_alive() const override; + bool is_friendly() const override; + bool is_friendly(const iLiving& other) const override; + bool is_shielded() const override; + int get_shared_dmg(int base_dmg) const override; + location get_loc() const override; - void apply_status(eStatus which, int how_much); - void heal(int how_much); - void poison(int how_much); - void cure(int how_much); - void acid(int how_much); - void curse(int how_much); - void slow(int how_much); - void web(int how_much); - void disease(int how_much); - void dumbfound(int how_much); - void scare(int how_much); - void sleep(eStatus type, int how_much, int adj); - void clear_bad_status(); - void avatar(); - void drain_sp(int how_much, bool allow_resist); - void restore_sp(int how_much); + void apply_status(eStatus which, int how_much) override; + void heal(int how_much) override; + void poison(int how_much) override; + void cure(int how_much) override; + void acid(int how_much) override; + void curse(int how_much) override; + void slow(int how_much) override; + void web(int how_much) override; + void disease(int how_much) override; + void dumbfound(int how_much) override; + void scare(int how_much) override; + void sleep(eStatus type, int how_much, int adj) override; + void clear_bad_status() override; + void avatar() override; + void drain_sp(int how_much, bool allow_resist) override; + void restore_sp(int how_much) override; - int get_health() const; - int get_magic() const; - int get_level() const; + int get_health() const override; + int get_magic() const override; + int get_level() const override; int calc_day() const; std::unique_ptr remove_pc(size_t spot); diff --git a/src/universe/pc.hpp b/src/universe/pc.hpp index 6810e21d..b5b1e2ad 100644 --- a/src/universe/pc.hpp +++ b/src/universe/pc.hpp @@ -110,33 +110,33 @@ public: short parry = 0; iLiving* last_attacked = nullptr; // Note: Currently this is assigned but never read - bool is_alive() const; - bool is_friendly(const iLiving& other) const; - bool is_friendly() const; - bool is_shielded() const; - int get_shared_dmg(int base_dmg) const; + bool is_alive() const override; + bool is_friendly(const iLiving& other) const override; + bool is_friendly() const override; + bool is_shielded() const override; + int get_shared_dmg(int base_dmg) const override; - int get_health() const; - int get_magic() const; - int get_level() const; - location get_loc() const; + int get_health() const override; + int get_magic() const override; + int get_level() const override; + location get_loc() const override; void finish_create(); - void void_sanctuary(); - void heal(int how_much); - void poison(int how_much); - void cure(int how_much); - void acid(int how_much); - void curse(int how_much); - void slow(int how_much); - void web(int how_much); - void disease(int how_much); - void dumbfound(int how_much); - void scare(int how_much); - void sleep(eStatus type, int how_much, int adj); - void avatar(); - void drain_sp(int how_much, bool allow_resist); - void restore_sp(int how_much); + void void_sanctuary() override; + void heal(int how_much) override; + void poison(int how_much) override; + void cure(int how_much) override; + void acid(int how_much) override; + void curse(int how_much) override; + void slow(int how_much) override; + void web(int how_much) override; + void disease(int how_much) override; + void dumbfound(int how_much) override; + void scare(int how_much) override; + void sleep(eStatus type, int how_much, int adj) override; + void avatar() override; + void drain_sp(int how_much, bool allow_resist) override; + void restore_sp(int how_much) override; void combine_things(); void sort_items();