Commit c514fa7f authored by argon.sun's avatar argon.sun

fix

parent 1bfca3f2
......@@ -405,7 +405,68 @@ void ClientField::ReplaySwap() {
std::swap(grave[0], grave[1]);
std::swap(remove[0], remove[1]);
std::swap(extra[0], extra[1]);
RefreshAllCards();
for(int p = 0; p < 2; ++p) {
for(auto cit = deck[p].begin(); cit != deck[p].end(); ++cit) {
(*cit)->controler = 1 - (*cit)->controler;
GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot);
(*cit)->mTransform.setTranslation((*cit)->curPos);
(*cit)->mTransform.setRotationRadians((*cit)->curRot);
(*cit)->is_moving = false;
}
for(auto cit = hand[p].begin(); cit != hand[p].end(); ++cit) {
(*cit)->controler = 1 - (*cit)->controler;
GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot);
(*cit)->mTransform.setTranslation((*cit)->curPos);
(*cit)->mTransform.setRotationRadians((*cit)->curRot);
(*cit)->is_moving = false;
}
for(auto cit = mzone[p].begin(); cit != mzone[p].end(); ++cit) {
if(*cit) {
(*cit)->controler = 1 - (*cit)->controler;
GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot);
(*cit)->mTransform.setTranslation((*cit)->curPos);
(*cit)->mTransform.setRotationRadians((*cit)->curRot);
(*cit)->is_moving = false;
}
}
for(auto cit = szone[p].begin(); cit != szone[p].end(); ++cit) {
if(*cit) {
(*cit)->controler = 1 - (*cit)->controler;
GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot);
(*cit)->mTransform.setTranslation((*cit)->curPos);
(*cit)->mTransform.setRotationRadians((*cit)->curRot);
(*cit)->is_moving = false;
}
}
for(auto cit = grave[p].begin(); cit != grave[p].end(); ++cit) {
(*cit)->controler = 1 - (*cit)->controler;
GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot);
(*cit)->mTransform.setTranslation((*cit)->curPos);
(*cit)->mTransform.setRotationRadians((*cit)->curRot);
(*cit)->is_moving = false;
}
for(auto cit = remove[p].begin(); cit != remove[p].end(); ++cit) {
(*cit)->controler = 1 - (*cit)->controler;
GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot);
(*cit)->mTransform.setTranslation((*cit)->curPos);
(*cit)->mTransform.setRotationRadians((*cit)->curRot);
(*cit)->is_moving = false;
}
for(auto cit = extra[p].begin(); cit != extra[p].end(); ++cit) {
(*cit)->controler = 1 - (*cit)->controler;
GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot);
(*cit)->mTransform.setTranslation((*cit)->curPos);
(*cit)->mTransform.setRotationRadians((*cit)->curRot);
(*cit)->is_moving = false;
}
}
for(auto cit = overlay_cards.begin(); cit != overlay_cards.end(); ++cit) {
(*cit)->controler = 1 - (*cit)->controler;
GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot);
(*cit)->mTransform.setTranslation((*cit)->curPos);
(*cit)->mTransform.setRotationRadians((*cit)->curRot);
(*cit)->is_moving = false;
}
mainGame->dInfo.isFirst = !mainGame->dInfo.isFirst;
std::swap(mainGame->dInfo.lp[0], mainGame->dInfo.lp[1]);
for(int i = 0; i < 16; ++i)
......@@ -421,14 +482,12 @@ void ClientField::ReplaySwap() {
void ClientField::RefreshAllCards() {
for(int p = 0; p < 2; ++p) {
for(auto cit = deck[p].begin(); cit != deck[p].end(); ++cit) {
(*cit)->controler = 1 - (*cit)->controler;
GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot);
(*cit)->mTransform.setTranslation((*cit)->curPos);
(*cit)->mTransform.setRotationRadians((*cit)->curRot);
(*cit)->is_moving = false;
}
for(auto cit = hand[p].begin(); cit != hand[p].end(); ++cit) {
(*cit)->controler = 1 - (*cit)->controler;
GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot);
(*cit)->mTransform.setTranslation((*cit)->curPos);
(*cit)->mTransform.setRotationRadians((*cit)->curRot);
......@@ -436,7 +495,6 @@ void ClientField::RefreshAllCards() {
}
for(auto cit = mzone[p].begin(); cit != mzone[p].end(); ++cit) {
if(*cit) {
(*cit)->controler = 1 - (*cit)->controler;
GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot);
(*cit)->mTransform.setTranslation((*cit)->curPos);
(*cit)->mTransform.setRotationRadians((*cit)->curRot);
......@@ -445,7 +503,6 @@ void ClientField::RefreshAllCards() {
}
for(auto cit = szone[p].begin(); cit != szone[p].end(); ++cit) {
if(*cit) {
(*cit)->controler = 1 - (*cit)->controler;
GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot);
(*cit)->mTransform.setTranslation((*cit)->curPos);
(*cit)->mTransform.setRotationRadians((*cit)->curRot);
......@@ -453,21 +510,18 @@ void ClientField::RefreshAllCards() {
}
}
for(auto cit = grave[p].begin(); cit != grave[p].end(); ++cit) {
(*cit)->controler = 1 - (*cit)->controler;
GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot);
(*cit)->mTransform.setTranslation((*cit)->curPos);
(*cit)->mTransform.setRotationRadians((*cit)->curRot);
(*cit)->is_moving = false;
}
for(auto cit = remove[p].begin(); cit != remove[p].end(); ++cit) {
(*cit)->controler = 1 - (*cit)->controler;
GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot);
(*cit)->mTransform.setTranslation((*cit)->curPos);
(*cit)->mTransform.setRotationRadians((*cit)->curRot);
(*cit)->is_moving = false;
}
for(auto cit = extra[p].begin(); cit != extra[p].end(); ++cit) {
(*cit)->controler = 1 - (*cit)->controler;
GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot);
(*cit)->mTransform.setTranslation((*cit)->curPos);
(*cit)->mTransform.setRotationRadians((*cit)->curRot);
......@@ -475,7 +529,6 @@ void ClientField::RefreshAllCards() {
}
}
for(auto cit = overlay_cards.begin(); cit != overlay_cards.end(); ++cit) {
(*cit)->controler = 1 - (*cit)->controler;
GetCardLocation(*cit, &(*cit)->curPos, &(*cit)->curRot);
(*cit)->mTransform.setTranslation((*cit)->curPos);
(*cit)->mTransform.setRotationRadians((*cit)->curRot);
......
......@@ -814,8 +814,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->showcardp = 0;
mainGame->dInfo.vic_string = 0;
wchar_t vic_buf[256];
if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping)
mainGame->gMutex.Unlock();
if(player == 2)
mainGame->showcardcode = 3;
else if(mainGame->LocalPlayer(player) == 0) {
......@@ -1501,8 +1499,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
if(!mainGame->dInfo.isReplay)
panel_confirm.push_back(pcard);
}
} else
field_confirm.push_back(pcard);
} else {
if(!mainGame->dInfo.isReplay || (l & LOCATION_ONFIELD))
field_confirm.push_back(pcard);
}
}
if (field_confirm.size() > 0) {
for(int i = 0; i < field_confirm.size(); ++i) {
......
......@@ -14,7 +14,7 @@
#include <dirent.h>
#endif
const unsigned short PRO_VERSION = 0x12a0;
const unsigned short PRO_VERSION = 0x12b0;
namespace ygo {
......@@ -422,7 +422,7 @@ bool Game::Initialize() {
scrFilter->setSmallStep(1);
scrFilter->setVisible(false);
//replay window
wReplay = env->addWindow(rect<s32>(220, 100, 800, 520), false, dataManager.GetSysString(1200));
wReplay = env->addWindow(rect<s32>(220, 100, 800, 520), false, dataManager.GetSysString(1202));
wReplay->getCloseButton()->setVisible(false);
wReplay->setVisible(false);
lstReplayList = env->addListBox(rect<s32>(10, 30, 350, 400), wReplay, LISTBOX_REPLAY_LIST, true);
......@@ -431,6 +431,9 @@ bool Game::Initialize() {
btnReplayCancel = env->addButton(rect<s32>(460, 385, 570, 410), wReplay, BUTTON_CANCEL_REPLAY, dataManager.GetSysString(1347));
env->addStaticText(dataManager.GetSysString(1349), rect<s32>(360, 30, 570, 50), false, true, wReplay);
stReplayInfo = env->addStaticText(L"", rect<s32>(360, 60, 570, 350), false, true, wReplay);
env->addStaticText(dataManager.GetSysString(1353), rect<s32>(360, 275, 570, 295), false, true, wReplay);
ebRepStartTurn = env->addEditBox(L"", rect<s32>(360, 300, 460, 320), true, wReplay, -1);
ebRepStartTurn->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
//single play window
wSinglePlay = env->addWindow(rect<s32>(220, 100, 800, 520), false, dataManager.GetSysString(1201));
wSinglePlay->getCloseButton()->setVisible(false);
......
......@@ -221,6 +221,7 @@ public:
irr::gui::IGUIStaticText* stReplayInfo;
irr::gui::IGUIButton* btnLoadReplay;
irr::gui::IGUIButton* btnReplayCancel;
irr::gui::IGUIEditBox* ebRepStartTurn;
//single play
irr::gui::IGUIWindow* wSinglePlay;
irr::gui::IGUIListBox* lstSinglePlayList;
......
......@@ -127,6 +127,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
case BUTTON_REPLAY_MODE: {
mainGame->HideElement(mainGame->wMainMenu);
mainGame->ShowElement(mainGame->wReplay);
mainGame->ebRepStartTurn->setText(L"1");
mainGame->RefreshReplay();
break;
}
......@@ -160,7 +161,10 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame->dField.Clear();
mainGame->HideElement(mainGame->wReplay);
mainGame->device->setEventReceiver(&mainGame->dField);
ReplayMode::StartReplay(0);
unsigned int start_turn = _wtoi(mainGame->ebRepStartTurn->getText());
if(start_turn == 1)
start_turn = 0;
ReplayMode::StartReplay(start_turn);
break;
}
case BUTTON_CANCEL_REPLAY: {
......@@ -253,6 +257,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
else
myswprintf(infobuf, L"%ls\n===VS===\n%ls\n", (wchar_t*)ReplayMode::cur_replay.replay_data, (wchar_t*)(&ReplayMode::cur_replay.replay_data[40]));
repinfo.append(infobuf);
mainGame->ebRepStartTurn->setText(L"1");
mainGame->SetStaticText(mainGame->stReplayInfo, 180, mainGame->guiFont, (wchar_t*)repinfo.c_str());
break;
}
......
......@@ -192,8 +192,10 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
mainGame->dInfo.curMsg = BufferIO::ReadUInt8(pbuf);
switch (mainGame->dInfo.curMsg) {
case MSG_RETRY: {
if(mainGame->dInfo.isReplaySkiping)
if(mainGame->dInfo.isReplaySkiping) {
mainGame->dField.RefreshAllCards();
mainGame->gMutex.Unlock();
}
mainGame->gMutex.Lock();
mainGame->stMessage->setText(L"Error occurs.");
mainGame->PopupElement(mainGame->wMessage);
......@@ -208,6 +210,10 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
break;
}
case MSG_WIN: {
if(mainGame->dInfo.isReplaySkiping) {
mainGame->dField.RefreshAllCards();
mainGame->gMutex.Unlock();
}
pbuf += 2;
DuelClient::ClientAnalyze(offset, pbuf - offset);
return false;
......
--Shadow of the Six Samurai - Shien
function c1828513.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c1828513.xyzfilter,2)
c:EnableReviveLimit()
--attack up
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetDescription(aux.Stringid(1828513,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCost(c1828513.cost)
e1:SetTarget(c1828513.target)
e1:SetOperation(c1828513.operation)
c:RegisterEffect(e1)
end
function c1828513.xyzfilter(c)
return c:GetLevel()==4 and c:IsSetCard(0x3d)
end
function c1828513.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c1828513.filter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) and c:IsAttackBelow(2000)
end
function c1828513.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1828513.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1828513.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c1828513.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c1828513.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c1828513.filter(tc) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(2000)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
......@@ -80,7 +80,7 @@ function c3897065.atkop(e,tp,eg,ep,ev,re,r,rp)
local atk=c:GetBaseAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE)
e1:SetValue(atk/2)
c:RegisterEffect(e1)
......
......@@ -5,6 +5,7 @@ function c53334471.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DRAW_PHASE)
e1:SetTarget(c53334471.acttg)
c:RegisterEffect(e1)
--adjust
local e2=Effect.CreateEffect(c)
......@@ -42,6 +43,11 @@ function c53334471.initial_effect(c)
end
c53334471[0]=0
c53334471[1]=0
function c53334471.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
c53334471[0]=0
c53334471[1]=0
end
function c53334471.sumlimit(e,c,sump,sumtype,sumpos,targetp)
if sumpos and bit.band(sumpos,POS_FACEDOWN)>0 then return false end
local at=c53334471[sump]
......@@ -69,21 +75,27 @@ function c53334471.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if g1:GetCount()==0 then c53334471[tp]=0
else
c53334471[tp]=c53334471.getattribute(g1)
if bit.band(c53334471[tp],c53334471[tp]-1)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(53334471,0))
c53334471[tp]=Duel.AnnounceAttribute(tp,1,c53334471[tp])
local att=c53334471.getattribute(g1)
if bit.band(att,att-1)~=0 then
if c53334471[tp]==0 or bit.band(c53334471[tp],att)==0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(53334471,0))
att=Duel.AnnounceAttribute(tp,1,att)
else att=c53334471[tp] end
end
g1:Remove(c53334471.rmfilter,nil,c53334471[tp])
g1:Remove(c53334471.rmfilter,nil,att)
c53334471[tp]=att
end
if g2:GetCount()==0 then c53334471[1-tp]=0
else
c53334471[1-tp]=c53334471.getattribute(g2)
if bit.band(c53334471[1-tp],c53334471[1-tp]-1)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(53334471,0))
c53334471[1-tp]=Duel.AnnounceAttribute(1-tp,1,c53334471[1-tp])
local att=c53334471.getattribute(g2)
if bit.band(att,att-1)~=0 then
if c53334471[1-tp]==0 or bit.band(c53334471[1-tp],att)==0 then
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(53334471,0))
att=Duel.AnnounceAttribute(1-tp,1,att)
else att=c53334471[1-tp] end
end
g2:Remove(c53334471.rmfilter,nil,c53334471[1-tp])
g2:Remove(c53334471.rmfilter,nil,att)
c53334471[1-tp]=att
end
g1:Merge(g2)
if g1:GetCount()>0 then
......
......@@ -24,14 +24,14 @@ function c62437430.filter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemove() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c62437430.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c62437430.filter,tp,0x13,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,0x13)
if chk==0 then return Duel.IsExistingMatchingCard(c62437430.filter,tp,0x16,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,0x16)
end
function c62437430.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,c62437430.filter,tp,0x13,0,1,1,nil):GetFirst()
local tc=Duel.SelectMatchingCard(tp,c62437430.filter,tp,0x16,0,1,1,nil):GetFirst()
if tc then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
tc:RegisterFlagEffect(62437430,RESET_EVENT+0x1fe0000,0,0)
......
--炎星侯-ホウシン
function c74168099.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(74168099,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c74168099.spcon)
e1:SetTarget(c74168099.sptg)
e1:SetOperation(c74168099.spop)
c:RegisterEffect(e1)
--cannot spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c74168099.spcon)
e2:SetOperation(c74168099.regop)
c:RegisterEffect(e2)
end
function c74168099.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
end
function c74168099.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:GetLevel()==3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c74168099.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c74168099.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c74168099.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c74168099.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c74168099.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c74168099.splimit)
e1:SetLabelObject(e)
Duel.RegisterEffect(e1,tp)
end
function c74168099.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLevelAbove(5)
end
......@@ -5,6 +5,7 @@ function c90846359.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DRAW_PHASE)
e1:SetTarget(c90846359.acttg)
c:RegisterEffect(e1)
--adjust
local e2=Effect.CreateEffect(c)
......@@ -42,6 +43,11 @@ function c90846359.initial_effect(c)
end
c90846359[0]=0
c90846359[1]=0
function c90846359.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
c90846359[0]=0
c90846359[1]=0
end
function c90846359.sumlimit(e,c,sump,sumtype,sumpos,targetp)
if sumpos and bit.band(sumpos,POS_FACEDOWN)>0 then return false end
local rc=c90846359[sump]
......@@ -69,21 +75,27 @@ function c90846359.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if g1:GetCount()==0 then c90846359[tp]=0
else
c90846359[tp]=c90846359.getrace(g1)
if bit.band(c90846359[tp],c90846359[tp]-1)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(90846359,0))
c90846359[tp]=Duel.AnnounceRace(tp,1,c90846359[tp])
local rac=c90846359.getrace(g1)
if bit.band(rac,rac-1)~=0 then
if c90846359[tp]==0 or bit.band(c90846359[tp],rac)==0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(90846359,0))
rac=Duel.AnnounceRace(tp,1,rac)
else rac=c90846359[tp] end
end
g1:Remove(c90846359.rmfilter,nil,c90846359[tp])
g1:Remove(c90846359.rmfilter,nil,rac)
c90846359[tp]=rac
end
if g2:GetCount()==0 then c90846359[1-tp]=0
else
c90846359[1-tp]=c90846359.getrace(g2)
if bit.band(c90846359[1-tp],c90846359[1-tp]-1)~=0 then
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(90846359,0))
c90846359[1-tp]=Duel.AnnounceRace(1-tp,1,c90846359[1-tp])
local rac=c90846359.getrace(g2)
if bit.band(rac,rac-1)~=0 then
if c90846359[1-tp]==0 or bit.band(c90846359[1-tp],rac)==0 then
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(90846359,0))
rac=Duel.AnnounceRace(1-tp,1,rac)
else rac=c90846359[1-tp] end
end
g2:Remove(c90846359.rmfilter,nil,c90846359[1-tp])
g2:Remove(c90846359.rmfilter,nil,rac)
c90846359[1-tp]=rac
end
g1:Merge(g2)
if g1:GetCount()>0 then
......
......@@ -310,6 +310,7 @@
!system 1350 离开
!system 1351 投降
!system 1352 主要信息:
!system 1353 播放起始于回合:
!system 1390 等待行动中...
!system 1391 等待行动中....
!system 1392 等待行动中.....
......
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