Make Snow Witch killable after reactor activation
This commit is contained in:
@@ -20,6 +20,5 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
function hit() {
|
||||
rm.hitMonsterWithReactor(6090001, 4);
|
||||
rm.getReactor().setEventState(Math.floor(Math.random() * 3));
|
||||
rm.weakenAreaBoss(6090001, "The light at the altar appeases the hatred of the Snow Witch. The force of the Witch has weakened.");
|
||||
}
|
||||
@@ -20,6 +20,5 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
function hit() {
|
||||
rm.hitMonsterWithReactor(6090001, 4);
|
||||
rm.getReactor().setEventState(Math.floor(Math.random() * 3));
|
||||
rm.weakenAreaBoss(6090001, "The light at the altar appeases the hatred of the Snow Witch. The force of the Witch has weakened.");
|
||||
}
|
||||
@@ -20,6 +20,5 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
function hit() {
|
||||
rm.hitMonsterWithReactor(6090001, 4);
|
||||
rm.getReactor().setEventState(Math.floor(Math.random() * 3));
|
||||
rm.weakenAreaBoss(6090001, "The light at the altar appeases the hatred of the Snow Witch. The force of the Witch has weakened.");
|
||||
}
|
||||
@@ -32,6 +32,8 @@ import scripting.AbstractPlayerInteraction;
|
||||
import server.ItemInformationProvider;
|
||||
import server.TimerManager;
|
||||
import server.life.LifeFactory;
|
||||
import server.life.MobSkill;
|
||||
import server.life.MobSkillFactory;
|
||||
import server.life.Monster;
|
||||
import server.maps.MapMonitor;
|
||||
import server.maps.MapleMap;
|
||||
@@ -342,4 +344,31 @@ public class ReactorActionManager extends AbstractPlayerInteraction {
|
||||
getPlayer().getMap().getBlueTeamBuffs().remove(skil);
|
||||
}
|
||||
}
|
||||
|
||||
public void weakenAreaBoss(int monsterId, String message) {
|
||||
MapleMap map = reactor.getMap();
|
||||
Monster monster = map.getMonsterById(monsterId);
|
||||
if (monster == null) {
|
||||
System.err.println("Area boss not found. Monster id " + monsterId);
|
||||
return;
|
||||
}
|
||||
|
||||
applySealSkill(monster);
|
||||
applyReduceAvoid(monster);
|
||||
sendBlueNotice(map, message);
|
||||
}
|
||||
|
||||
private void applySealSkill(Monster monster) {
|
||||
MobSkill sealSkill = MobSkillFactory.getMobSkill(157, 1);
|
||||
sealSkill.applyEffect(monster);
|
||||
}
|
||||
|
||||
private void applyReduceAvoid(Monster monster) {
|
||||
MobSkill reduceAvoidSkill = MobSkillFactory.getMobSkill(155, 2);
|
||||
reduceAvoidSkill.applyEffect(monster);
|
||||
}
|
||||
|
||||
private void sendBlueNotice(MapleMap map, String message) {
|
||||
map.dropMessage(6, message);
|
||||
}
|
||||
}
|
||||
@@ -122,6 +122,10 @@ public class MobSkill {
|
||||
service.registerOverallAction(monster.getMap().getId(), toRun, animationTime);
|
||||
}
|
||||
|
||||
public void applyEffect(Monster monster) {
|
||||
applyEffect(null, monster, false, Collections.emptyList());
|
||||
}
|
||||
|
||||
public void applyEffect(Character player, Monster monster, boolean skill, List<Character> banishPlayers) {
|
||||
Disease disease = null;
|
||||
Map<MonsterStatus, Integer> stats = new ArrayMap<>();
|
||||
|
||||
Reference in New Issue
Block a user