605 |
return ITEM_KILL; // remove from inventory |
return ITEM_KILL; // remove from inventory |
606 |
} |
} |
607 |
void message(const string &msg, const Value &/*val*/) { |
void message(const string &msg, const Value &/*val*/) { |
608 |
if (msg == "ignite" || msg == "expl") |
bool explode = false; |
609 |
|
|
610 |
|
if (msg == "ignite") { |
611 |
|
// dynamite does not blow Documents in Oxyd1 |
612 |
|
explode = enigma::GameCompatibility != GAMET_OXYD1; |
613 |
|
} |
614 |
|
else if (msg == "expl" || msg == "bombstone") |
615 |
SetItem(get_pos(), MakeItem("it-explosion1")); |
SetItem(get_pos(), MakeItem("it-explosion1")); |
616 |
} |
} |
617 |
bool on_laserhit(Direction) { |
bool on_laserhit(Direction) { |
691 |
bool m_burning; |
bool m_burning; |
692 |
|
|
693 |
// Private methods |
// Private methods |
694 |
void explode() { |
virtual void explode() = 0; |
|
GridPos p = get_pos(); |
|
|
SendExplosionEffect(p, BOMB); |
|
|
play_sound("explosion1"); |
|
|
SetItem(p, MakeItem("it-explosion3")); |
|
|
} |
|
695 |
|
|
696 |
void burn() { |
void burn() { |
697 |
if (!m_burning) { |
if (!m_burning) { |
754 |
BlackBomb() : Bomb("it-blackbomb") {} |
BlackBomb() : Bomb("it-blackbomb") {} |
755 |
private: |
private: |
756 |
const char *burn_anim() const { return "it-blackbomb-burning"; } |
const char *burn_anim() const { return "it-blackbomb-burning"; } |
757 |
|
void explode() { |
758 |
|
GridPos p = get_pos(); |
759 |
|
SendExplosionEffect(p, BLACKBOMB); |
760 |
|
play_sound("explosion1"); |
761 |
|
SetItem(p, MakeItem("it-explosion3")); |
762 |
|
} |
763 |
}; |
}; |
764 |
} |
} |
765 |
|
|
784 |
|
|
785 |
private: |
private: |
786 |
const char *burn_anim() const { return "it-whitebomb-burning"; } |
const char *burn_anim() const { return "it-whitebomb-burning"; } |
787 |
|
void explode() { |
788 |
|
GridPos p = get_pos(); |
789 |
|
SendExplosionEffect(p, WHITEBOMB); |
790 |
|
play_sound("explosion1"); |
791 |
|
SetItem(p, MakeItem("it-explosion3")); |
792 |
|
} |
793 |
}; |
}; |
794 |
} |
} |
795 |
|
|