Frame 1
function SuteCardSet(SuteCardNum) {
basex = 34;
basey = 83.3;
cardnumber = SuteCardNum % 13;
cardsuite = (SuteCardNum - cardnumber) / 13;
SuteCardName = "SuteCardObj" + SuteCardNum;
CardObj[cardsuite].duplicateMovieClip(SuteCardName, 100 + SuteCardNum);
CardSetObj = eval (SuteCardName);
CardSetObj._x = basex + (cardnumber * 43.8);
CardSetObj._y = basey + (cardsuite * 67);
CardSetObj.gotoAndStop(cardnumber + 1);
}
function SuteCardRemove() {
i = 0;
while (i < 52) {
SuteCardName = "SuteCardObj" + i;
CardSetObj = eval (SuteCardName);
CardSetObj.removeMovieClip();
i++;
}
}
function SuteCardTrans(SuteCardNum) {
basex = 34;
basey = 83.3;
cardnumber = SuteCardNum % 13;
cardsuite = (SuteCardNum - cardnumber) / 13;
SuteCardName = "SuteCardObj" + SuteCardNum;
CardSetObj = eval (SuteCardName);
CardSetObj._alpha = 70;
}
function TehaiCardSet(SuteCardNum, PosSet) {
basex = 34;
basey = 364.3;
cardnumber = SuteCardNum % 13;
cardsuite = (SuteCardNum - cardnumber) / 13;
TehaiCardName = "TehaiCardObj" + PosSet;
CardObj[cardsuite].duplicateMovieClip(TehaiCardName, 200 + PosSet);
CardSetObj = eval (TehaiCardName);
CardSetObj._x = basex + (PosSet * 43.8);
CardSetObj._y = basey;
CardSetObj.gotoAndStop(cardnumber + 1);
}
function TehaiCardRemove(PosSet) {
TehaiCardName = "TehaiCardObj" + PosSet;
CardSetObj = eval (TehaiCardName);
CardSetObj.removeMovieClip();
}
function TehaiSort(ObjName) {
playerObj = eval (ObjName);
i = 0;
while (i < 12) {
k = 12;
while (i < k) {
if (playerObj[k] < playerObj[k - 1]) {
wk = playerObj[k - 1];
playerObj[k - 1] = playerObj[k];
playerObj[k] = wk;
}
k--;
}
i++;
}
}
function RoundedArw(arw) {
basex = 9.3;
redarrowMC._x = basex + ((arw - 1) * 150);
}
i = 0;
while (i < 52) {
card[i] = i;
i++;
}
CardObj = new Array();
i = 0;
while (i < 4) {
CardObj[i] = eval ("Card" + i);
i++;
}
TnlMCObj = new Array();
i = 0;
while (i < 4) {
TnlMCObj[i] = eval ("TnlArwMC" + i);
i++;
}
Instance of Symbol 18 MovieClip "card1" in Frame 1
/* no clip actions */
Instance of Symbol 34 MovieClip "card0" in Frame 1
/* no clip actions */
Instance of Symbol 50 MovieClip "card3" in Frame 1
/* no clip actions */
Instance of Symbol 54 MovieClip "card2" in Frame 1
/* no clip actions */
Instance of Symbol 56 MovieClip "TnlArwMC0" in Frame 1
onClipEvent (load) {
function tnlswitch(swvalue) {
trace("sw");
if (swvalue == 0) {
this._visible = false;
}
if (swvalue == 1) {
trace("swvalue ==1");
this._x = 7;
this._xscale = 100;
this._visible = true;
}
if (swvalue == 2) {
trace("swvalue ==2");
this._x = 586;
this._xscale = -100;
this._visible = true;
}
}
}
Instance of Symbol 56 MovieClip "TnlArwMC1" in Frame 1
onClipEvent (load) {
function tnlswitch(swvalue) {
trace("sw");
if (swvalue == 0) {
this._visible = false;
}
if (swvalue == 1) {
trace("swvalue ==1");
this._x = 7;
this._xscale = 100;
this._visible = true;
}
if (swvalue == 2) {
trace("swvalue ==2");
this._x = 586;
this._xscale = -100;
this._visible = true;
}
}
}
Instance of Symbol 56 MovieClip "TnlArwMC2" in Frame 1
onClipEvent (load) {
function tnlswitch(swvalue) {
trace("sw");
if (swvalue == 0) {
this._visible = false;
}
if (swvalue == 1) {
trace("swvalue ==1");
this._x = 7;
this._xscale = 100;
this._visible = true;
}
if (swvalue == 2) {
trace("swvalue ==2");
this._x = 586;
this._xscale = -100;
this._visible = true;
}
}
}
Instance of Symbol 57 MovieClip "TnlArwMC3" in Frame 1
onClipEvent (load) {
function tnlswitch(swvalue) {
trace("sw");
if (swvalue == 0) {
this._visible = false;
}
if (swvalue == 1) {
trace("swvalue ==1");
this._x = 7;
this._xscale = 100;
this._visible = true;
}
if (swvalue == 2) {
trace("swvalue ==2");
this._x = 586;
this._xscale = -100;
this._visible = true;
}
}
}
Frame 5
player1 = new array();
player2 = new array();
player3 = new array();
player4 = new array();
player = ["player0", "player1", "player2", "player3", "player4"];
cardwork = new array();
fieldsheet = new array();
playerdata = new array();
result = new array();
TnlSuite = new array();
i = 0;
while (i < 4) {
TnlSuite[i] = 0;
TnlMCObj[i].tnlswitch(0);
i++;
}
TnlSel = 1;
Frame 11
stop();
Instance of Symbol 65 MovieClip "cursol" in Frame 11
onClipEvent (load) {
}
onClipEvent (enterFrame) {
this._x = this._x + _xmouse;
this._y = this._y + _ymouse;
if (this._x < 0) {
this._x = 1;
}
if (550 < this._x) {
this._x = 549;
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root.TnlSelMC)) {
if (_root.TnlSel == 1) {
_root.TnlSel = 2;
} else {
_root.TnlSel = 1;
}
}
}
Instance of Symbol 72 MovieClip "TnlSelMC" in Frame 11
onClipEvent (enterFrame) {
if (_root.TnlSel == 1) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
Frame 20
SuteCardPos = 99;
Rounded = 0;
i = 0;
while (i < 4) {
result[i] = 0;
i++;
}
i = 0;
while (i < 52) {
fieldsheet[i] = 0;
i++;
}
i = 0;
while (i < 52) {
cardwork[i] = 99;
i++;
}
MAXCARD = 52;
i = 0;
while (i < MAXCARD) {
r = Math.floor(Math.random() * (MAXCARD - 0.01));
if (cardwork[r] == 99) {
cardwork[r] = i;
i++;
}
}
m = 0;
i = 1;
while (4 >= i) {
playerObj = eval (player[i]);
k = 0;
while (k < 13) {
playerObj[k] = cardwork[m];
m++;
k++;
}
i++;
}
i = 1;
while (4 >= i) {
playerdata[i] = {cardlast:13, pass:3, status:0};
i++;
}
TehaiSort(player[1]);
i = 0;
while (i < 13) {
TehaiCardSet(player1[i], i);
i++;
}
Frame 22
i = 1;
while (4 >= i) {
lastdisplayObj = eval ("lastdisplay" + i);
lastdisplayObj.text = playerdata[i].cardlast;
passdisplayObj = eval ("passdisplay" + i);
passdisplayObj.text = playerdata[i].pass;
i++;
}
stop();
Frame 23
i = 0;
while (i < 13) {
cardnum = (player1[i] % 13) + 1;
if (cardnum == 7) {
SuteCardSet(player1[i]);
TehaiCardRemove(i);
fieldsheet[player1[i]] = 1;
if (((player1[i] - (cardnum - 1)) / 13) == 1) {
Rounded = 1;
}
player1[i] = 99;
}
i++;
}
kk = 0;
i = 0;
while (i < 13) {
if (player1[i] != 99) {
kk++;
TehaiCardRemove(i);
}
i++;
}
trace(k);
TehaiSort(player[1]);
i = 0;
while (i < kk) {
TehaiCardSet(player1[i], i);
trace(i);
i++;
}
k = 0;
m = 2;
while (4 >= m) {
playerObj = eval (player[m]);
i = 0;
while (i < 13) {
cardnum = (playerObj[i] % 13) + 1;
if (cardnum == 7) {
SuteCardSet(playerObj[i]);
if (((playerObj[i] - (cardnum - 1)) / 13) == 1) {
Rounded = m;
}
fieldsheet[playerObj[i]] = 1;
playerObj[i] = 99;
}
i++;
}
TehaiSort(player[m]);
m++;
}
Rounded--;
Frame 25
n = 1;
while (4 >= n) {
playerObj = eval (player[n]);
k = 0;
i = 0;
while (i < 13) {
if (playerObj[i] != 99) {
k++;
}
i++;
}
playerdata[n].cardlast = k;
lastdisplayObj = eval ("lastdisplay" + n);
lastdisplayObj.text = k;
passdisplayObj = eval ("passdisplay" + n);
passdisplayObj.text = playerdata[n].pass;
n++;
}
Frame 30
Frame 31
if (Rounded != 0) {
lastdisplayObj = eval ("lastdisplay" + Rounded);
lastdisplayObj.text = playerdata[Rounded].cardlast;
passdisplayObj = eval ("passdisplay" + Rounded);
passdisplayObj.text = playerdata[Rounded].pass;
}
jumpcheck = 0;
endcheck = 0;
i = 1;
while (4 >= i) {
endcheck = endcheck + playerdata[i].cardlast;
i++;
}
if (endcheck == 0) {
jumpcheck = 2;
SuteCardRemove();
gotoAndPlay (120);
}
Rounded++;
if (4 < Rounded) {
Rounded = 1;
}
if (playerdata[Rounded].status == 0) {
charObj = eval ("char" + Rounded);
charObj.gotoAndPlay("normal");
}
RoundedArw(Rounded);
if (jumpcheck == 0) {
if (playerdata[Rounded].cardlast == 0) {
jumpcheck = 1;
gotoAndPlay (30);
}
}
if (jumpcheck == 0) {
if (Rounded == 1) {
SuteCardPos = 99;
gotoAndPlay (40);
} else {
gotoAndPlay (70);
}
}
Instance of Symbol 140 MovieClip "cursol" in Frame 40
onClipEvent (load) {
}
onClipEvent (enterFrame) {
this._x = this._x + _xmouse;
this._y = this._y + _ymouse;
if (this._x < 0) {
this._x = 1;
}
if (600 < this._x) {
this._x = 599;
}
updateAfterEvent();
}
onClipEvent (mouseDown) {
cardnum = 99;
i = 0;
while (i < 13) {
CardName = "_root.TehaiCardObj" + i;
CardHitObj = eval (CardName);
if (this.hitTest(CardHitObj)) {
cardnum = i;
}
i++;
}
if ((cardnum >= 0) && (cardnum < 13)) {
_root.SuteCardPos = cardnum;
}
}
Frame 42
if (SuteCardPos == 99) {
gotoAndPlay (40);
}
Frame 44
cardnum = (player1[SuteCardPos] % 13) + 1;
cardst = (player1[SuteCardPos] - (cardnum - 1)) / 13;
okng = 0;
suitecheck = 1;
trace("########");
if (TnlSuite[cardst] == 0) {
if (cardnum < 7) {
i = cardnum + 1;
while (7 >= i) {
if (fieldsheet[((cardst * 13) + i) - 1] != 1) {
suitecheck = 0;
}
i++;
}
if (suitecheck == 1) {
okng = 1;
if (((TnlSel == 2) && (cardnum == 1)) && (TnlSuite[cardst] == 0)) {
TnlSuite[cardst] = 1;
TnlMCObj[cardst].tnlswitch(1);
}
}
} else {
i = cardnum - 1;
while (i >= 7) {
if (fieldsheet[((cardst * 13) + i) - 1] != 1) {
suitecheck = 0;
}
i--;
}
if (suitecheck == 1) {
okng = 1;
if (((TnlSel == 2) && (cardnum == 13)) && (TnlSuite[cardst] == 0)) {
TnlSuite[cardst] = 2;
TnlMCObj[cardst].tnlswitch(2);
}
}
}
} else if (TnlSuite[cardst] == 1) {
if (cardnum == 13) {
okng = 1;
} else {
i = cardnum + 1;
while (13 >= i) {
if (fieldsheet[((cardst * 13) + i) - 1] != 1) {
trace(((cardst * 13) + i) - 1);
suitecheck = 0;
}
i++;
}
if (suitecheck == 1) {
okng = 1;
}
}
} else if (TnlSuite[cardst] == 2) {
if (cardnum == 1) {
okng = 1;
} else {
i = cardnum - 1;
while (i >= 1) {
if (fieldsheet[((cardst * 13) + i) - 1] != 1) {
trace(((cardst * 13) + i) - 1);
suitecheck = 0;
}
i--;
}
if (suitecheck == 1) {
okng = 1;
}
}
}
if (okng != 1) {
gotoAndPlay (40);
SuteCardPos = 99;
}
Frame 47
SuteCardSet(player1[SuteCardPos]);
TehaiCardRemove(SuteCardPos);
fieldsheet[player1[SuteCardPos]] = 1;
player1[SuteCardPos] = 99;
SuteCardPos = 99;
Frame 50
k = 0;
i = 0;
while (i < 13) {
if (player1[i] != 99) {
k++;
TehaiCardRemove(i);
}
i++;
}
playerdata[1].cardlast = k;
if (playerdata[1].cardlast == 0) {
agaricheck = 0;
i = 0;
while (i < 4) {
if ((result[i] == 0) && (agaricheck == 0)) {
result[i] = 1;
playerdata[1].status = 2;
char1.gotoAndPlay("smile");
agaricheck = 1;
}
i++;
}
}
TehaiSort(player[1]);
i = 0;
while (k >= i) {
TehaiCardSet(player1[i], i);
i++;
}
gotoAndPlay (30);
Frame 70
playerObj = eval (player[Rounded]);
SuteCardPos = 0;
Frame 75
cardnum = (playerObj[SuteCardPos] % 13) + 1;
cardst = (playerObj[SuteCardPos] - (cardnum - 1)) / 13;
okng = 0;
suitecheck = 1;
trace("########");
if (TnlSuite[cardst] == 0) {
if (cardnum < 7) {
i = cardnum + 1;
while (7 >= i) {
if (fieldsheet[((cardst * 13) + i) - 1] != 1) {
trace(((cardst * 13) + i) - 1);
suitecheck = 0;
}
i++;
}
if (suitecheck == 1) {
okng = 1;
if (((TnlSel == 2) && (cardnum == 1)) && (TnlSuite[cardst] == 0)) {
TnlSuite[cardst] = 1;
TnlMCObj[cardst].tnlswitch(1);
}
}
} else {
i = cardnum - 1;
while (i >= 7) {
if (fieldsheet[((cardst * 13) + i) - 1] != 1) {
trace(((cardst * 13) + i) - 1);
suitecheck = 0;
}
i--;
}
if (suitecheck == 1) {
okng = 1;
if (((TnlSel == 2) && (cardnum == 13)) && (TnlSuite[cardst] == 0)) {
TnlSuite[cardst] = 2;
TnlMCObj[cardst].tnlswitch(2);
}
}
}
} else if (TnlSuite[cardst] == 1) {
if (cardnum == 13) {
okng = 1;
} else {
i = cardnum + 1;
while (13 >= i) {
if (fieldsheet[((cardst * 13) + i) - 1] != 1) {
trace(((cardst * 13) + i) - 1);
suitecheck = 0;
}
i++;
}
if (suitecheck == 1) {
okng = 1;
}
}
} else if (TnlSuite[cardst] == 2) {
if (cardnum == 1) {
okng = 1;
} else {
i = cardnum - 1;
while (i >= 1) {
if (fieldsheet[((cardst * 13) + i) - 1] != 1) {
trace(((cardst * 13) + i) - 1);
suitecheck = 0;
}
i--;
}
if (suitecheck == 1) {
okng = 1;
}
}
}
if (okng != 1) {
if (SuteCardPos >= 12) {
playerdata[Rounded].pass--;
if (playerdata[Rounded].pass < 0) {
charObj = eval ("char" + Rounded);
charObj.gotoAndPlay("aborn");
gotoAndPlay (100);
} else {
charObj = eval ("char" + Rounded);
charObj.gotoAndPlay("pass");
gotoAndPlay (30);
}
} else {
gotoAndPlay (72);
SuteCardPos++;
}
}
Frame 77
SuteCardSet(playerObj[SuteCardPos]);
fieldsheet[playerObj[SuteCardPos]] = 1;
playerObj[SuteCardPos] = 99;
SuteCardPos = 99;
Frame 80
k = 0;
i = 0;
while (i < 13) {
if (playerObj[i] != 99) {
k++;
}
i++;
}
playerdata[Rounded].cardlast = k;
if (playerdata[Rounded].cardlast == 0) {
agaricheck = 0;
i = 0;
while (i < 4) {
if ((result[i] == 0) && (agaricheck == 0)) {
result[i] = Rounded;
playerdata[Rounded].status = 2;
charObj = eval ("char" + Rounded);
charObj.gotoAndPlay("smile");
agaricheck = 1;
}
i++;
}
}
TehaiSort(player[Rounded]);
gotoAndPlay (30);
Frame 100
SuteCardPos = 0;
playerObj = eval (player[Rounded]);
Frame 105
Frame 107
if (Rounded == 1) {
TehaiCardRemove(SuteCardPos);
}
SuteCardSet(playerObj[SuteCardPos]);
SuteCardTrans(playerObj[SuteCardPos]);
fieldsheet[playerObj[SuteCardPos]] = 1;
playerObj[SuteCardPos] = 99;
SuteCardPos++;
Frame 110
k = 0;
i = 0;
while (i < 13) {
if (playerObj[i] != 99) {
k++;
}
i++;
}
playerdata[Rounded].cardlast = k;
if (0 < playerdata[Rounded].cardlast) {
gotoAndPlay (104);
} else {
aborncheck = 0;
i = 3;
while (i >= 0) {
if ((result[i] == 0) && (aborncheck == 0)) {
result[i] = Rounded;
aborncheck = 1;
}
i--;
}
playerdata[Rounded].status = 1;
gotoAndPlay (30);
}
Frame 120
i = 0;
while (i < 4) {
TnlSuite[i] = 0;
TnlMCObj[i].tnlswitch(0);
i++;
}
texttmp = "";
i = 0;
while (i < 4) {
if (result[i] == 1) {
texttmp = texttmp + (((i + 1) + "ˆÊ@") + "PLAYER\n");
} else {
texttmp = texttmp + (((((i + 1) + "ˆÊ@") + "CPU") + result[i]) + newline);
}
i++;
}
ResultText = texttmp;
Frame 124
stop();
Frame 125
gotoAndPlay (10);
Symbol 18 MovieClip Frame 1
stop();
Symbol 18 MovieClip Frame 2
stop();
Symbol 18 MovieClip Frame 3
stop();
Symbol 18 MovieClip Frame 4
stop();
Symbol 18 MovieClip Frame 5
stop();
Symbol 18 MovieClip Frame 6
stop();
Symbol 18 MovieClip Frame 7
stop();
Symbol 18 MovieClip Frame 8
stop();
Symbol 18 MovieClip Frame 9
stop();
Symbol 18 MovieClip Frame 10
stop();
Symbol 18 MovieClip Frame 11
stop();
Symbol 18 MovieClip Frame 12
stop();
Symbol 18 MovieClip Frame 13
stop();
Symbol 18 MovieClip Frame 14
stop();
Symbol 34 MovieClip Frame 1
stop();
Symbol 34 MovieClip Frame 2
stop();
Symbol 34 MovieClip Frame 3
stop();
Symbol 34 MovieClip Frame 4
stop();
Symbol 34 MovieClip Frame 5
stop();
Symbol 34 MovieClip Frame 6
stop();
Symbol 34 MovieClip Frame 7
stop();
Symbol 34 MovieClip Frame 8
stop();
Symbol 34 MovieClip Frame 9
stop();
Symbol 34 MovieClip Frame 10
stop();
Symbol 34 MovieClip Frame 11
stop();
Symbol 34 MovieClip Frame 12
stop();
Symbol 34 MovieClip Frame 13
stop();
Symbol 34 MovieClip Frame 14
stop();
Symbol 50 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 2
stop();
Symbol 50 MovieClip Frame 3
stop();
Symbol 50 MovieClip Frame 4
stop();
Symbol 50 MovieClip Frame 5
stop();
Symbol 50 MovieClip Frame 6
stop();
Symbol 50 MovieClip Frame 7
stop();
Symbol 50 MovieClip Frame 8
stop();
Symbol 50 MovieClip Frame 9
stop();
Symbol 50 MovieClip Frame 10
stop();
Symbol 50 MovieClip Frame 11
stop();
Symbol 50 MovieClip Frame 12
stop();
Symbol 50 MovieClip Frame 13
stop();
Symbol 50 MovieClip Frame 14
stop();
Symbol 54 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 2
stop();
Symbol 54 MovieClip Frame 3
stop();
Symbol 54 MovieClip Frame 4
stop();
Symbol 54 MovieClip Frame 5
stop();
Symbol 54 MovieClip Frame 6
stop();
Symbol 54 MovieClip Frame 7
stop();
Symbol 54 MovieClip Frame 8
stop();
Symbol 54 MovieClip Frame 9
stop();
Symbol 54 MovieClip Frame 10
stop();
Symbol 54 MovieClip Frame 11
stop();
Symbol 54 MovieClip Frame 12
stop();
Symbol 54 MovieClip Frame 13
stop();
Symbol 54 MovieClip Frame 14
stop();
Symbol 62 Button
on (release) {
play();
}
Symbol 72 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 2
stop();
Symbol 102 MovieClip Frame 9
stop();
Symbol 102 MovieClip Frame 19
gotoAndPlay (10);
Symbol 102 MovieClip Frame 29
gotoAndPlay (20);
Symbol 102 MovieClip Frame 40
gotoAndPlay (30);
Symbol 102 MovieClip Frame 50
gotoAndPlay (42);
Symbol 102 MovieClip Frame 60
gotoAndPlay (52);
Symbol 112 MovieClip Frame 9
stop();
Symbol 112 MovieClip Frame 19
gotoAndPlay (10);
Symbol 112 MovieClip Frame 29
gotoAndPlay (20);
Symbol 112 MovieClip Frame 40
gotoAndPlay (30);
Symbol 112 MovieClip Frame 50
gotoAndPlay (42);
Symbol 112 MovieClip Frame 60
gotoAndPlay (52);
Symbol 121 MovieClip Frame 9
stop();
Symbol 121 MovieClip Frame 19
gotoAndPlay (10);
Symbol 121 MovieClip Frame 29
gotoAndPlay (20);
Symbol 121 MovieClip Frame 40
gotoAndPlay (30);
Symbol 121 MovieClip Frame 50
gotoAndPlay (42);
Symbol 121 MovieClip Frame 60
gotoAndPlay (52);
Symbol 132 MovieClip Frame 9
stop();
Symbol 132 MovieClip Frame 19
gotoAndPlay (10);
Symbol 132 MovieClip Frame 29
gotoAndPlay (20);
Symbol 132 MovieClip Frame 40
gotoAndPlay (30);
Symbol 132 MovieClip Frame 50
gotoAndPlay (42);
Symbol 132 MovieClip Frame 60
gotoAndPlay (52);
Symbol 136 Button
on (release) {
play();
}
Symbol 141 Button
on (release) {
_root.playerdata[1].pass--;
if (playerdata[1].pass < 0) {
char1.gotoAndPlay("aborn");
gotoAndPlay (100);
} else {
char1.gotoAndPlay("pass");
gotoAndPlay (30);
}
}