Make Shade killable after talking to lamp post
This commit is contained in:
@@ -46,8 +46,12 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (status == 0) {
|
if (status == 0) {
|
||||||
cm.sendOk("A small focus of light lighting in the immersive darkness.");
|
cm.sendAcceptDecline("This is a small lamp with a switch. Would you like to turn it on?");
|
||||||
|
return;
|
||||||
|
} else if (status == 1) {
|
||||||
|
cm.weakenAreaBoss(5090000, "You have turned the lamp on. Shade's strength will rapidly weaken due to the light.");
|
||||||
|
}
|
||||||
|
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1185,4 +1185,30 @@ public class AbstractPlayerInteraction {
|
|||||||
public long getCurrentTime() {
|
public long getCurrentTime() {
|
||||||
return Server.getInstance().getCurrentTime();
|
return Server.getInstance().getCurrentTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void weakenAreaBoss(int monsterId, String message) {
|
||||||
|
MapleMap map = c.getPlayer().getMap();
|
||||||
|
Monster monster = map.getMonsterById(monsterId);
|
||||||
|
if (monster == null) {
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -32,8 +32,6 @@ import scripting.AbstractPlayerInteraction;
|
|||||||
import server.ItemInformationProvider;
|
import server.ItemInformationProvider;
|
||||||
import server.TimerManager;
|
import server.TimerManager;
|
||||||
import server.life.LifeFactory;
|
import server.life.LifeFactory;
|
||||||
import server.life.MobSkill;
|
|
||||||
import server.life.MobSkillFactory;
|
|
||||||
import server.life.Monster;
|
import server.life.Monster;
|
||||||
import server.maps.MapMonitor;
|
import server.maps.MapMonitor;
|
||||||
import server.maps.MapleMap;
|
import server.maps.MapleMap;
|
||||||
@@ -344,31 +342,4 @@ public class ReactorActionManager extends AbstractPlayerInteraction {
|
|||||||
getPlayer().getMap().getBlueTeamBuffs().remove(skil);
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user