diff options
author | Jesusaves <cpntb1@ymail.com> | 2024-07-30 13:23:17 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2024-07-30 13:23:17 -0300 |
commit | 2d9c2a7cbbdddc7cbb955e60e83e36dd1a2091cd (patch) | |
tree | 567762205eccd5360a21910603190ac51764ba5d | |
parent | eacc7a8967687e4a8a9189c695254883b4b9d3f2 (diff) | |
download | serverdata-2d9c2a7cbbdddc7cbb955e60e83e36dd1a2091cd.tar.gz serverdata-2d9c2a7cbbdddc7cbb955e60e83e36dd1a2091cd.tar.bz2 serverdata-2d9c2a7cbbdddc7cbb955e60e83e36dd1a2091cd.tar.xz serverdata-2d9c2a7cbbdddc7cbb955e60e83e36dd1a2091cd.zip |
Smoke Dragon may now show up when it's raining if the Fortress Island is reachable.
They'll avoid towns, but I'm not confident this specifically will work.
-rw-r--r-- | npc/functions/news.txt | 1 | ||||
-rw-r--r-- | npc/functions/weather.txt | 38 |
2 files changed, 38 insertions, 1 deletions
diff --git a/npc/functions/news.txt b/npc/functions/news.txt index 1d99318d2..be4d6304a 100644 --- a/npc/functions/news.txt +++ b/npc/functions/news.txt @@ -375,6 +375,7 @@ function script EventHelp { function script Journalman { /* Random Fun Fact */ npctalk3 any( + ($GAME_STORYLINE >= 4 ? l("Strange dragon seem during rains! Be careful when you leave your house!") : l("We seem to be having a fine weather, despite the Monster King activity!")), l("Halinarzo Church makes a party every Sunday! Only true believers are invited!"), l("Beware the Terranite! Only @@ would be brave enough to challenge them!", ($MOST_HEROIC$ == "" ? "Andrei Sakar" : $MOST_HEROIC$)), l("Terrible manaquake hits the whole world, causing dramatic changes!"), diff --git a/npc/functions/weather.txt b/npc/functions/weather.txt index 497d0ab6a..067340f0f 100644 --- a/npc/functions/weather.txt +++ b/npc/functions/weather.txt @@ -32,6 +32,7 @@ function script is_night { } 000-0,0,0,0 script #WeatherCore NPC_HIDDEN,{ + function _smokeDragon; end; /* @@ -162,6 +163,9 @@ OnMinute45: else if (.@r < 300) .@mk=.@mk|MASK_SANDSTORM; + // Handle the Smoke Dragon appearance + _smokeDragon(.@key$, .@mk, MASK_RAIN); + } else if (.@type$ == "woodland") { if (.@r < 300) .@mk=.@mk|MASK_RAIN; @@ -171,12 +175,18 @@ OnMinute45: else if (season() == WINTER && .@r >= 9250) .@mk=.@mk|MASK_SNOW; + // Handle the Smoke Dragon appearance + _smokeDragon(.@key$, .@mk, MASK_RAIN); + } else if (.@type$ == "iceland") { if (.@r < 30) .@mk=.@mk|MASK_RAIN; else if (.@r < 300) .@mk=.@mk|MASK_SNOW; + // Handle the Smoke Dragon appearance + _smokeDragon(.@key$, .@mk, MASK_RAIN); + } else if (.@type$ == "special") { // This biom is too hot for snow. But it may rain. if (.@r < 300) @@ -190,6 +200,9 @@ OnMinute45: else if (.@r % 4 == 3) .@mk=.@mk|MASK_MATTACK; + // Handle the Smoke Dragon appearance + _smokeDragon(.@key$, .@mk, MASK_RAIN); + } else { consolebug "Warning warning, blame Saulc! Weather system error on map "+.@key$; announce("ERROR BLAME SAULC! WEATHER SYSTEM CORRUPTED.", bc_all); @@ -297,6 +310,27 @@ OnMinute45: return; } +// Spawn a Smoke Dragon (mapName, mapMask, goalState, mob=SmokeDragon) +// goalState can be a sum of bitmasks... That's no issue +function _smokeDragon { + .@key$=getarg(0); + .@mk=getarg(1); + .@go=getarg(2); + .@mb=getarg(3, SmokeDragon); + if ($GAME_STORYLINE >= 4) { + if (!getmapflag(.@key$, mf_town)) { + if (.@mk & .@go) { + .@x2=getmapinfo(MAPINFO_SIZE_X, .@key$) - 20; + .@y2=getmapinfo(MAPINFO_SIZE_Y, .@key$) - 20; + areamonster(.@key$, 20, 20, .@x2, .@y2, strmobinfo(1, .@mb), .@mb, 1); + } else { + killmonster(.@key$, "#WeatherCore::OnMob"); + } + } + } + return; +} + // Some commands, for GMs manually override weather OnRain: WeatherSwitch(MASK_RAIN); @@ -318,6 +352,9 @@ OnEvil: WeatherSwitch(MASK_EVILSANCTUM); end; +OnMob: + end; + OnManual: if (!.@atcmd_numparameters) { dispbottom l("Syntax: @wset <map_mask>"); @@ -358,5 +395,4 @@ OnReset: getmapxy(.@key$,.@a,.@b,0); setmapmask(.@key$, MASK_NONE); end; - } |