Commit a19f676f authored by mercury233's avatar mercury233 Committed by GitHub

add EVENT_SPSUMMON_SUCCESS_G_P (#538)

parent e3420498
...@@ -518,6 +518,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2) ...@@ -518,6 +518,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EVENT_SUMMON_NEGATED 1114 #define EVENT_SUMMON_NEGATED 1114
#define EVENT_FLIP_SUMMON_NEGATED 1115 #define EVENT_FLIP_SUMMON_NEGATED 1115
#define EVENT_SPSUMMON_NEGATED 1116 #define EVENT_SPSUMMON_NEGATED 1116
#define EVENT_SPSUMMON_SUCCESS_G_P 1117
#define EVENT_CONTROL_CHANGED 1120 #define EVENT_CONTROL_CHANGED 1120
#define EVENT_EQUIP 1121 #define EVENT_EQUIP 1121
#define EVENT_ATTACK_ANNOUNCE 1130 #define EVENT_ATTACK_ANNOUNCE 1130
...@@ -561,7 +562,13 @@ constexpr int32 HALF_DAMAGE = 0x80000001; ...@@ -561,7 +562,13 @@ constexpr int32 HALF_DAMAGE = 0x80000001;
#define CODE_PHASE 3 // header + phase_id (12 bits) #define CODE_PHASE 3 // header + phase_id (12 bits)
#define CODE_VALUE 4 // numeric value, max = 4095 #define CODE_VALUE 4 // numeric value, max = 4095
const std::unordered_set<uint32> continuous_event({ EVENT_ADJUST, EVENT_BREAK_EFFECT, EVENT_TURN_END }); const std::unordered_set<uint32> continuous_event{
EVENT_ADJUST,
EVENT_BREAK_EFFECT,
EVENT_TURN_END,
EVENT_PRE_BATTLE_DAMAGE,
EVENT_SPSUMMON_SUCCESS_G_P,
};
bool is_continuous_event(uint32 code); bool is_continuous_event(uint32 code);
#endif /* EFFECT_H_ */ #endif /* EFFECT_H_ */
...@@ -3126,6 +3126,13 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin ...@@ -3126,6 +3126,13 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
return FALSE; return FALSE;
} }
case 28: { case 28: {
group * pgroup = core.units.begin()->ptarget;
raise_event(&pgroup->container, EVENT_SPSUMMON_SUCCESS_G_P, core.units.begin()->peffect, 0, sumplayer, sumplayer, 0);
process_instant_event();
adjust_all();
return FALSE;
}
case 29: {
group* pgroup = core.units.begin()->ptarget; group* pgroup = core.units.begin()->ptarget;
pduel->write_buffer8(MSG_SPSUMMONED); pduel->write_buffer8(MSG_SPSUMMONED);
set_spsummon_counter(sumplayer); set_spsummon_counter(sumplayer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment