From a28bfd717195b6e5bfc4a96e5fca26721e958576 Mon Sep 17 00:00:00 2001 From: ErikasKontenis Date: Wed, 4 Dec 2019 15:48:47 +0200 Subject: [PATCH] little introduce drown and fix some monsters --- config.lua | 2 +- data/monster/781/acolyte of the cult.xml | 76 ++++++++++ data/monster/781/adept of the cult.xml | 79 ++++++++++ data/monster/781/azure frog.xml | 45 ++++++ data/monster/781/blood crab.xml | 55 +++++++ data/monster/781/brutus bloodbeard.xml | 46 ++++++ data/monster/781/carrion worm.xml | 54 +++++++ data/monster/781/coral frog.xml | 43 ++++++ data/monster/781/crimson frog.xml | 44 ++++++ data/monster/781/deadeye devious.xml | 58 +++++++ data/monster/781/enlightened of the cult.xml | 90 +++++++++++ data/monster/781/green frog.xml | 24 +++ data/monster/781/island troll.xml | 67 ++++++++ data/monster/781/lavahole.xml | 38 +++++ data/monster/781/lethal lissy.xml | 45 ++++++ data/monster/781/mammoth.xml | 54 +++++++ data/monster/781/massive water elemental.xml | 47 ++++++ data/monster/781/morgaroth.xml | 151 +++++++++++++++++++ data/monster/781/novice of the cult.xml | 72 +++++++++ data/monster/781/orchid frog.xml | 41 +++++ data/monster/781/pirate buccaneer.xml | 73 +++++++++ data/monster/781/pirate corsair.xml | 73 +++++++++ data/monster/781/pirate cutthroat.xml | 70 +++++++++ data/monster/781/pirate ghost.xml | 77 ++++++++++ data/monster/781/pirate marauder.xml | 73 +++++++++ data/monster/781/pirate skeleton.xml | 55 +++++++ data/monster/781/quara constrictor scout.xml | 64 ++++++++ data/monster/781/quara constrictor.xml | 76 ++++++++++ data/monster/781/quara hydromancer scout.xml | 86 +++++++++++ data/monster/781/quara hydromancer.xml | 92 +++++++++++ data/monster/781/quara mantassin scout.xml | 66 ++++++++ data/monster/781/quara mantassin.xml | 75 +++++++++ data/monster/781/quara pincher scout.xml | 73 +++++++++ data/monster/781/quara pincher.xml | 73 +++++++++ data/monster/781/quara predator scout.xml | 65 ++++++++ data/monster/781/quara predator.xml | 78 ++++++++++ data/monster/781/ron the ripper.xml | 42 ++++++ data/monster/781/seagull.xml | 19 +++ data/monster/781/thornback tortoise.xml | 53 +++++++ data/monster/781/thul.xml | 53 +++++++ data/monster/781/tiquandas revenge.xml | 71 +++++++++ data/monster/781/toad.xml | 58 +++++++ data/monster/781/tortoise.xml | 52 +++++++ data/monster/781/water elemental.xml | 48 ++++++ data/monster/monsters.xml | 45 ++++++ src/combat.cpp | 6 + src/condition.cpp | 5 + src/const.h | 3 +- src/creature.cpp | 3 + src/enums.h | 4 +- src/game.cpp | 6 + src/luascript.cpp | 2 + src/monsters.cpp | 14 +- src/player.cpp | 4 + src/spells.cpp | 1 + src/tools.cpp | 3 + 56 files changed, 2788 insertions(+), 4 deletions(-) create mode 100644 data/monster/781/acolyte of the cult.xml create mode 100644 data/monster/781/adept of the cult.xml create mode 100644 data/monster/781/azure frog.xml create mode 100644 data/monster/781/blood crab.xml create mode 100644 data/monster/781/brutus bloodbeard.xml create mode 100644 data/monster/781/carrion worm.xml create mode 100644 data/monster/781/coral frog.xml create mode 100644 data/monster/781/crimson frog.xml create mode 100644 data/monster/781/deadeye devious.xml create mode 100644 data/monster/781/enlightened of the cult.xml create mode 100644 data/monster/781/green frog.xml create mode 100644 data/monster/781/island troll.xml create mode 100644 data/monster/781/lavahole.xml create mode 100644 data/monster/781/lethal lissy.xml create mode 100644 data/monster/781/mammoth.xml create mode 100644 data/monster/781/massive water elemental.xml create mode 100644 data/monster/781/morgaroth.xml create mode 100644 data/monster/781/novice of the cult.xml create mode 100644 data/monster/781/orchid frog.xml create mode 100644 data/monster/781/pirate buccaneer.xml create mode 100644 data/monster/781/pirate corsair.xml create mode 100644 data/monster/781/pirate cutthroat.xml create mode 100644 data/monster/781/pirate ghost.xml create mode 100644 data/monster/781/pirate marauder.xml create mode 100644 data/monster/781/pirate skeleton.xml create mode 100644 data/monster/781/quara constrictor scout.xml create mode 100644 data/monster/781/quara constrictor.xml create mode 100644 data/monster/781/quara hydromancer scout.xml create mode 100644 data/monster/781/quara hydromancer.xml create mode 100644 data/monster/781/quara mantassin scout.xml create mode 100644 data/monster/781/quara mantassin.xml create mode 100644 data/monster/781/quara pincher scout.xml create mode 100644 data/monster/781/quara pincher.xml create mode 100644 data/monster/781/quara predator scout.xml create mode 100644 data/monster/781/quara predator.xml create mode 100644 data/monster/781/ron the ripper.xml create mode 100644 data/monster/781/seagull.xml create mode 100644 data/monster/781/thornback tortoise.xml create mode 100644 data/monster/781/thul.xml create mode 100644 data/monster/781/tiquandas revenge.xml create mode 100644 data/monster/781/toad.xml create mode 100644 data/monster/781/tortoise.xml create mode 100644 data/monster/781/water elemental.xml diff --git a/config.lua b/config.lua index e354f60..0383f6a 100644 --- a/config.lua +++ b/config.lua @@ -52,7 +52,7 @@ timeBetweenExActions = 1000 -- Map -- NOTE: set mapName WITHOUT .otbm at the end -mapName = "map" +mapName = "mymap" mapAuthor = "CipSoft" -- MySQL diff --git a/data/monster/781/acolyte of the cult.xml b/data/monster/781/acolyte of the cult.xml new file mode 100644 index 0000000..9bceeb2 --- /dev/null +++ b/data/monster/781/acolyte of the cult.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/adept of the cult.xml b/data/monster/781/adept of the cult.xml new file mode 100644 index 0000000..df54e10 --- /dev/null +++ b/data/monster/781/adept of the cult.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/azure frog.xml b/data/monster/781/azure frog.xml new file mode 100644 index 0000000..1ff9919 --- /dev/null +++ b/data/monster/781/azure frog.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/blood crab.xml b/data/monster/781/blood crab.xml new file mode 100644 index 0000000..994707f --- /dev/null +++ b/data/monster/781/blood crab.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/brutus bloodbeard.xml b/data/monster/781/brutus bloodbeard.xml new file mode 100644 index 0000000..d47a5b9 --- /dev/null +++ b/data/monster/781/brutus bloodbeard.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/carrion worm.xml b/data/monster/781/carrion worm.xml new file mode 100644 index 0000000..e04dcc2 --- /dev/null +++ b/data/monster/781/carrion worm.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/coral frog.xml b/data/monster/781/coral frog.xml new file mode 100644 index 0000000..1009fd1 --- /dev/null +++ b/data/monster/781/coral frog.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/crimson frog.xml b/data/monster/781/crimson frog.xml new file mode 100644 index 0000000..d5afcd6 --- /dev/null +++ b/data/monster/781/crimson frog.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/deadeye devious.xml b/data/monster/781/deadeye devious.xml new file mode 100644 index 0000000..f6cf585 --- /dev/null +++ b/data/monster/781/deadeye devious.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/enlightened of the cult.xml b/data/monster/781/enlightened of the cult.xml new file mode 100644 index 0000000..60f633f --- /dev/null +++ b/data/monster/781/enlightened of the cult.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/green frog.xml b/data/monster/781/green frog.xml new file mode 100644 index 0000000..de8c261 --- /dev/null +++ b/data/monster/781/green frog.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/island troll.xml b/data/monster/781/island troll.xml new file mode 100644 index 0000000..8ca9521 --- /dev/null +++ b/data/monster/781/island troll.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/lavahole.xml b/data/monster/781/lavahole.xml new file mode 100644 index 0000000..88195e7 --- /dev/null +++ b/data/monster/781/lavahole.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/lethal lissy.xml b/data/monster/781/lethal lissy.xml new file mode 100644 index 0000000..b679e28 --- /dev/null +++ b/data/monster/781/lethal lissy.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/mammoth.xml b/data/monster/781/mammoth.xml new file mode 100644 index 0000000..79949f1 --- /dev/null +++ b/data/monster/781/mammoth.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/massive water elemental.xml b/data/monster/781/massive water elemental.xml new file mode 100644 index 0000000..d80a50b --- /dev/null +++ b/data/monster/781/massive water elemental.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/morgaroth.xml b/data/monster/781/morgaroth.xml new file mode 100644 index 0000000..8984067 --- /dev/null +++ b/data/monster/781/morgaroth.xml @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/novice of the cult.xml b/data/monster/781/novice of the cult.xml new file mode 100644 index 0000000..c1d6377 --- /dev/null +++ b/data/monster/781/novice of the cult.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/orchid frog.xml b/data/monster/781/orchid frog.xml new file mode 100644 index 0000000..d39dceb --- /dev/null +++ b/data/monster/781/orchid frog.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/pirate buccaneer.xml b/data/monster/781/pirate buccaneer.xml new file mode 100644 index 0000000..4ef9f37 --- /dev/null +++ b/data/monster/781/pirate buccaneer.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/pirate corsair.xml b/data/monster/781/pirate corsair.xml new file mode 100644 index 0000000..3ea24db --- /dev/null +++ b/data/monster/781/pirate corsair.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/pirate cutthroat.xml b/data/monster/781/pirate cutthroat.xml new file mode 100644 index 0000000..0dc157d --- /dev/null +++ b/data/monster/781/pirate cutthroat.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/pirate ghost.xml b/data/monster/781/pirate ghost.xml new file mode 100644 index 0000000..cf20e3b --- /dev/null +++ b/data/monster/781/pirate ghost.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/pirate marauder.xml b/data/monster/781/pirate marauder.xml new file mode 100644 index 0000000..77b16fb --- /dev/null +++ b/data/monster/781/pirate marauder.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/pirate skeleton.xml b/data/monster/781/pirate skeleton.xml new file mode 100644 index 0000000..367133d --- /dev/null +++ b/data/monster/781/pirate skeleton.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/quara constrictor scout.xml b/data/monster/781/quara constrictor scout.xml new file mode 100644 index 0000000..218fb8b --- /dev/null +++ b/data/monster/781/quara constrictor scout.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/quara constrictor.xml b/data/monster/781/quara constrictor.xml new file mode 100644 index 0000000..dbf134d --- /dev/null +++ b/data/monster/781/quara constrictor.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/quara hydromancer scout.xml b/data/monster/781/quara hydromancer scout.xml new file mode 100644 index 0000000..4e656dc --- /dev/null +++ b/data/monster/781/quara hydromancer scout.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data/monster/781/quara hydromancer.xml b/data/monster/781/quara hydromancer.xml new file mode 100644 index 0000000..812fd57 --- /dev/null +++ b/data/monster/781/quara hydromancer.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/quara mantassin scout.xml b/data/monster/781/quara mantassin scout.xml new file mode 100644 index 0000000..d08c660 --- /dev/null +++ b/data/monster/781/quara mantassin scout.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/quara mantassin.xml b/data/monster/781/quara mantassin.xml new file mode 100644 index 0000000..e0fbaad --- /dev/null +++ b/data/monster/781/quara mantassin.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/quara pincher scout.xml b/data/monster/781/quara pincher scout.xml new file mode 100644 index 0000000..cb92363 --- /dev/null +++ b/data/monster/781/quara pincher scout.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data/monster/781/quara pincher.xml b/data/monster/781/quara pincher.xml new file mode 100644 index 0000000..4bc7e2c --- /dev/null +++ b/data/monster/781/quara pincher.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/quara predator scout.xml b/data/monster/781/quara predator scout.xml new file mode 100644 index 0000000..834c696 --- /dev/null +++ b/data/monster/781/quara predator scout.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/quara predator.xml b/data/monster/781/quara predator.xml new file mode 100644 index 0000000..2db39b1 --- /dev/null +++ b/data/monster/781/quara predator.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/ron the ripper.xml b/data/monster/781/ron the ripper.xml new file mode 100644 index 0000000..4d9284a --- /dev/null +++ b/data/monster/781/ron the ripper.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/seagull.xml b/data/monster/781/seagull.xml new file mode 100644 index 0000000..2f5cc89 --- /dev/null +++ b/data/monster/781/seagull.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/thornback tortoise.xml b/data/monster/781/thornback tortoise.xml new file mode 100644 index 0000000..312bdba --- /dev/null +++ b/data/monster/781/thornback tortoise.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data/monster/781/thul.xml b/data/monster/781/thul.xml new file mode 100644 index 0000000..fa5b2cd --- /dev/null +++ b/data/monster/781/thul.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/tiquandas revenge.xml b/data/monster/781/tiquandas revenge.xml new file mode 100644 index 0000000..ec0e7c3 --- /dev/null +++ b/data/monster/781/tiquandas revenge.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/toad.xml b/data/monster/781/toad.xml new file mode 100644 index 0000000..1dbb1ef --- /dev/null +++ b/data/monster/781/toad.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/tortoise.xml b/data/monster/781/tortoise.xml new file mode 100644 index 0000000..b1703b4 --- /dev/null +++ b/data/monster/781/tortoise.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/781/water elemental.xml b/data/monster/781/water elemental.xml new file mode 100644 index 0000000..014c2cd --- /dev/null +++ b/data/monster/781/water elemental.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/monster/monsters.xml b/data/monster/monsters.xml index d844a6e..631a7f3 100644 --- a/data/monster/monsters.xml +++ b/data/monster/monsters.xml @@ -163,4 +163,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/combat.cpp b/src/combat.cpp index 52bc2da..e63bc0f 100644 --- a/src/combat.cpp +++ b/src/combat.cpp @@ -82,6 +82,9 @@ CombatType_t Combat::ConditionToDamageType(ConditionType_t type) case CONDITION_POISON: return COMBAT_EARTHDAMAGE; + case CONDITION_DROWN: + return COMBAT_DROWNDAMAGE; + default: break; } @@ -101,6 +104,9 @@ ConditionType_t Combat::DamageToConditionType(CombatType_t type) case COMBAT_EARTHDAMAGE: return CONDITION_POISON; + case COMBAT_DROWNDAMAGE: + return CONDITION_DROWN; + default: return CONDITION_NONE; } diff --git a/src/condition.cpp b/src/condition.cpp index 13b02cd..d5c5ece 100644 --- a/src/condition.cpp +++ b/src/condition.cpp @@ -131,6 +131,7 @@ Condition* Condition::createCondition(ConditionId_t id, ConditionType_t type, in case CONDITION_POISON: case CONDITION_FIRE: case CONDITION_ENERGY: + case CONDITION_DROWN: return new ConditionDamage(id, type, subId); case CONDITION_HASTE: @@ -994,6 +995,10 @@ uint32_t ConditionDamage::getIcons() const icons |= ICON_POISON; break; + case CONDITION_DROWN: + icons |= ICON_DROWNING; + break; + default: break; } diff --git a/src/const.h b/src/const.h index fd9107c..c4dffb2 100644 --- a/src/const.h +++ b/src/const.h @@ -171,7 +171,8 @@ enum Icons_t { ICON_MANASHIELD = 1 << 4, ICON_PARALYZE = 1 << 5, ICON_HASTE = 1 << 6, - ICON_SWORDS = 1 << 7 + ICON_SWORDS = 1 << 7, + ICON_DROWNING = 1 << 8, }; enum WeaponType_t : uint8_t { diff --git a/src/creature.cpp b/src/creature.cpp index 8bd0318..da8bf6d 100644 --- a/src/creature.cpp +++ b/src/creature.cpp @@ -1026,6 +1026,9 @@ void Creature::onTickCondition(ConditionType_t type, bool& bRemove) case CONDITION_POISON: bRemove = (field->getCombatType() != COMBAT_EARTHDAMAGE); break; + case CONDITION_DROWN: + bRemove = (field->getCombatType() != COMBAT_DROWNDAMAGE); + break; default: break; } diff --git a/src/enums.h b/src/enums.h index a403145..d6bf53a 100644 --- a/src/enums.h +++ b/src/enums.h @@ -102,8 +102,9 @@ enum CombatType_t : uint16_t { COMBAT_LIFEDRAIN = 1 << 5, COMBAT_MANADRAIN = 1 << 6, COMBAT_HEALING = 1 << 7, + COMBAT_DROWNDAMAGE = 1 << 8, - COMBAT_COUNT = 9 + COMBAT_COUNT = 10 }; enum CombatParam_t { @@ -249,6 +250,7 @@ enum ConditionType_t { CONDITION_EXHAUST = 1 << 17, CONDITION_PACIFIED = 1 << 18, CONDITION_AGGRESSIVE = 1 << 19, + CONDITION_DROWN = 1 << 20, }; enum ConditionId_t : int8_t { diff --git a/src/game.cpp b/src/game.cpp index 2291a02..0a487a2 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -3391,6 +3391,12 @@ void Game::combatGetTypeInfo(CombatType_t combatType, Creature* target, TextColo effect = CONST_ME_MAGIC_RED; break; } + + case COMBAT_DROWNDAMAGE: { + color = TEXTCOLOR_LIGHTBLUE; + effect = CONST_ME_LOSEENERGY; + break; + } default: { color = TEXTCOLOR_NONE; effect = CONST_ME_NONE; diff --git a/src/luascript.cpp b/src/luascript.cpp index 4338a6b..a995631 100644 --- a/src/luascript.cpp +++ b/src/luascript.cpp @@ -1069,6 +1069,7 @@ void LuaScriptInterface::registerFunctions() registerEnum(COMBAT_ENERGYDAMAGE) registerEnum(COMBAT_EARTHDAMAGE) registerEnum(COMBAT_FIREDAMAGE) + registerEnum(COMBAT_DROWNDAMAGE) registerEnum(COMBAT_UNDEFINEDDAMAGE) registerEnum(COMBAT_LIFEDRAIN) registerEnum(COMBAT_MANADRAIN) @@ -1091,6 +1092,7 @@ void LuaScriptInterface::registerFunctions() registerEnum(CONDITION_POISON) registerEnum(CONDITION_FIRE) registerEnum(CONDITION_ENERGY) + registerEnum(CONDITION_DROWN) registerEnum(CONDITION_HASTE) registerEnum(CONDITION_PARALYZE) registerEnum(CONDITION_OUTFIT) diff --git a/src/monsters.cpp b/src/monsters.cpp index 9b5c467..e5101d5 100644 --- a/src/monsters.cpp +++ b/src/monsters.cpp @@ -392,6 +392,8 @@ bool Monsters::deserializeSpell(const pugi::xml_node& node, spellBlock_t& sb, co combat->setParam(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE); } else if (tmpName == "energy") { combat->setParam(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE); + } else if (tmpName == "drown") { + combat->setParam(COMBAT_PARAM_TYPE, COMBAT_DROWNDAMAGE); } else if (tmpName == "lifedrain") { combat->setParam(COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN); } else if (tmpName == "manadrain") { @@ -480,7 +482,7 @@ bool Monsters::deserializeSpell(const pugi::xml_node& node, spellBlock_t& sb, co } else if (tmpName == "firecondition" || tmpName == "energycondition" || tmpName == "earthcondition" || tmpName == "poisoncondition" || tmpName == "icecondition" || tmpName == "freezecondition" || - tmpName == "physicalcondition") { + tmpName == "physicalcondition" || tmpName == "drowncondition") { ConditionType_t conditionType = CONDITION_NONE; if (tmpName == "firecondition") { @@ -489,6 +491,8 @@ bool Monsters::deserializeSpell(const pugi::xml_node& node, spellBlock_t& sb, co conditionType = CONDITION_POISON; } else if (tmpName == "energycondition") { conditionType = CONDITION_ENERGY; + } else if (tmpName == "drowncondition") { + conditionType = CONDITION_DROWN; } int32_t cycle = 0; @@ -828,6 +832,9 @@ bool Monsters::loadMonster(const std::string& file, const std::string& monsterNa } else if (tmpStrValue == "fire") { mType->info.damageImmunities |= COMBAT_FIREDAMAGE; mType->info.conditionImmunities |= CONDITION_FIRE; + } else if (tmpStrValue == "drown") { + mType->info.damageImmunities |= COMBAT_DROWNDAMAGE; + mType->info.conditionImmunities |= CONDITION_DROWN; } else if (tmpStrValue == "poison" || tmpStrValue == "earth") { mType->info.damageImmunities |= COMBAT_EARTHDAMAGE; @@ -861,6 +868,11 @@ bool Monsters::loadMonster(const std::string& file, const std::string& monsterNa mType->info.damageImmunities |= COMBAT_FIREDAMAGE; mType->info.conditionImmunities |= CONDITION_FIRE; } + } else if ((attr = immunityNode.attribute("drown"))) { + if (attr.as_bool()) { + mType->info.damageImmunities |= COMBAT_DROWNDAMAGE; + mType->info.conditionImmunities |= CONDITION_DROWN; + } } else if ((attr = immunityNode.attribute("poison")) || (attr = immunityNode.attribute("earth"))) { if (attr.as_bool()) { mType->info.damageImmunities |= COMBAT_EARTHDAMAGE; diff --git a/src/player.cpp b/src/player.cpp index a9f114c..1bc1d17 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -2951,6 +2951,10 @@ void Player::onAddCombatCondition(ConditionType_t type) sendTextMessage(MESSAGE_STATUS_DEFAULT, "You are poisoned."); break; + case CONDITION_DROWN: + sendTextMessage(MESSAGE_STATUS_SMALL, "You are drowning."); + break; + case CONDITION_PARALYZE: sendTextMessage(MESSAGE_STATUS_DEFAULT, "You are paralyzed."); break; diff --git a/src/spells.cpp b/src/spells.cpp index b08a048..03500da 100644 --- a/src/spells.cpp +++ b/src/spells.cpp @@ -398,6 +398,7 @@ bool Spell::configureSpell(const pugi::xml_node& node) "firecondition", "poisoncondition", "energycondition", + "drowncondition", }; //static size_t size = sizeof(reservedList) / sizeof(const char*); diff --git a/src/tools.cpp b/src/tools.cpp index 84560bc..506f512 100644 --- a/src/tools.cpp +++ b/src/tools.cpp @@ -672,6 +672,7 @@ ShootTypeNames shootTypeNames[] = { CombatTypeNames combatTypeNames[] = { {"physical", COMBAT_PHYSICALDAMAGE}, {"energy", COMBAT_ENERGYDAMAGE}, + {"drown", COMBAT_DROWNDAMAGE}, {"earth", COMBAT_EARTHDAMAGE}, {"poison", COMBAT_EARTHDAMAGE}, {"fire", COMBAT_FIREDAMAGE}, @@ -914,6 +915,8 @@ size_t combatTypeToIndex(CombatType_t combatType) return 6; case COMBAT_HEALING: return 7; + case COMBAT_DROWNDAMAGE: + return 8; default: return 0; }