Commit fea5f30e authored by fallenstardust's avatar fallenstardust

sync ocgcore

parent 236060f9
......@@ -1773,10 +1773,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
respbuf[0] = mainGame->LocalPlayer(0);
respbuf[1] = LOCATION_MZONE;
filter = mainGame->dField.selectable_field & 0x7f;
} else if (mainGame->dField.selectable_field & 0x1f00) {
} else if (mainGame->dField.selectable_field & 0x3f00) {
respbuf[0] = mainGame->LocalPlayer(0);
respbuf[1] = LOCATION_SZONE;
filter = (mainGame->dField.selectable_field >> 8) & 0x1f;
filter = (mainGame->dField.selectable_field >> 8) & 0x3f;
} else if (mainGame->dField.selectable_field & 0xc000) {
respbuf[0] = mainGame->LocalPlayer(0);
respbuf[1] = LOCATION_SZONE;
......@@ -1786,10 +1786,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
respbuf[0] = mainGame->LocalPlayer(1);
respbuf[1] = LOCATION_MZONE;
filter = (mainGame->dField.selectable_field >> 16) & 0x7f;
} else if (mainGame->dField.selectable_field & 0x1f000000) {
} else if (mainGame->dField.selectable_field & 0x3f000000) {
respbuf[0] = mainGame->LocalPlayer(1);
respbuf[1] = LOCATION_SZONE;
filter = (mainGame->dField.selectable_field >> 24) & 0x1f;
filter = (mainGame->dField.selectable_field >> 24) & 0x3f;
} else {
respbuf[0] = mainGame->LocalPlayer(1);
respbuf[1] = LOCATION_SZONE;
......@@ -2530,6 +2530,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
else if(reason & REASON_DESTROY && pl != cl)
mainGame->soundManager->PlaySoundEffect(SoundManager::SFX::DESTROYED);
}
int appear = mainGame->gameConf.quick_animation ? 12 : 20;
if (pl == 0) {
ClientCard* pcard = new ClientCard();
pcard->position = cp;
......@@ -2540,8 +2541,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->gMutex.unlock();
mainGame->dField.GetCardLocation(pcard, &pcard->curPos, &pcard->curRot, true);
pcard->curAlpha = 5;
mainGame->dField.FadeCard(pcard, 255, 20);
mainGame->WaitFrameSignal(20);
mainGame->dField.FadeCard(pcard, 255, appear);
mainGame->WaitFrameSignal(appear);
} else
mainGame->dField.AddCard(pcard, cc, cl, cs);
} else if (cl == 0) {
......@@ -2552,8 +2553,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
for(auto eqit = pcard->equipped.begin(); eqit != pcard->equipped.end(); ++eqit)
(*eqit)->equipTarget = 0;
if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) {
mainGame->dField.FadeCard(pcard, 5, 20);
mainGame->WaitFrameSignal(20);
mainGame->dField.FadeCard(pcard, 5, appear);
mainGame->WaitFrameSignal(appear);
mainGame->gMutex.lock();
mainGame->dField.RemoveCard(pc, pl, ps);
mainGame->gMutex.unlock();
......
......@@ -3627,7 +3627,7 @@ int32 card::is_capable_cost_to_grave(uint8 playerid) {
uint32 dest = LOCATION_GRAVE;
if(data.type & TYPE_TOKEN)
return FALSE;
if((data.type & TYPE_PENDULUM) && (current.location & LOCATION_ONFIELD) && !is_affected_by_effect(EFFECT_CANNOT_TO_DECK))
if((data.type & TYPE_PENDULUM) && (current.location & LOCATION_ONFIELD) && is_capable_send_to_extra(playerid))
return FALSE;
if(current.location == LOCATION_GRAVE)
return FALSE;
......
......@@ -819,7 +819,8 @@ uint32 field::get_linked_zone(int32 playerid) {
}
uint32 field::get_rule_zone_fromex(int32 playerid, card* pcard) {
if(core.duel_rule >= 4) {
if(core.duel_rule >= 5 && pcard && pcard->is_position(POS_FACEDOWN) && (pcard->data.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ)))
if(core.duel_rule >= 5 && pcard && (pcard->data.type & (TYPE_FUSION | TYPE_SYNCHRO | TYPE_XYZ))
&& (pcard->is_position(POS_FACEDOWN) || !(pcard->data.type & TYPE_PENDULUM)))
return 0x7f;
else
return get_linked_zone(playerid) | (1u << 5) | (1u << 6);
......
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