📄 b.java
字号:
for(int i2 = 0; i2 < ai.length; i2++)
ai[i2] = j1 + i2;
if(i1 == 11)
M.a("新闻报道", "这些地方受到天使庇护:\n", ai, l != 0);
else
if(i1 == 5)
M.a("新闻报道", "这些地方受到怪兽攻击:\n", ai, l != 0);
else
if(i1 == 15)
M.a("地震报道", "这些地方受到地震破坏:\n", ai, l != 0);
repaint();
serviceRepaints();
}
private void f(int i1, int j1)
{
for(int k1 = i1; k1 < j1 + 1; k1++)
if(ae[k1] != 0)
ae[k1] = ae[k1] >= 10 ? ae[k1] >= 100 ? 100 : 10 : 1;
}
private void w()
{
int i1 = d();
int j1;
for(j1 = d(); k(i1) != k(j1) || j1 == i1; j1 = d());
f(i1, i1 + 1);
f(j1, j1 + 1);
repaint();
serviceRepaints();
int ai[] = {
i1, j1
};
M.a("火灾报道", "大火毁灭此地\n区:", ai, l != 0);
}
private int d()
{
int i1 = e(28);
if(i1 == 3 || i1 == 6 || i1 == 9 || i1 == 14 || i1 == 17 || i1 == 21 || i1 == 24)
i1 = d();
return i1;
}
private int k(int i1)
{
return i1 >= 3 ? i1 >= 6 ? i1 >= 9 ? ((int) (i1 >= 14 ? ((int) (i1 >= 17 ? ((int) (i1 >= 21 ? ((int) (i1 >= 24 ? ((int) (i1 >= 29 ? 8 : 7)) : 6)) : 5)) : 4)) : 3)) : 2 : 1 : 0;
}
private void d(int i1)
{
if(i1 == 10)
i1 = e(7);
for(int j1 = 0; j1 < 5; j1++)
if(g[l][j1] == 16)
{
g[l][j1] = i1;
M.a(i1, l != 0);
return;
}
j(i1);
}
private void j(int i1)
{
for(int j1 = 0; j1 < 4; j1++)
g[l][j1] = g[l][j1 + 1];
g[l][4] = i1;
M.a(i1, l != 0);
}
public void h(int i1)
{
a(l, i1);
switch(i1)
{
case 3: // '\003'
default:
break;
case 0: // '\0'
int j1 = n();
if(j1 == -1)
M.b("无任何的卡片可以抢夺.", l != 0);
else
d(j1);
break;
case 1: // '\001'
int k1 = 0;
for(int l1 = 0; l1 < 3; l1++)
if(l1 != l)
{
N[l1] /= 2;
k1 += N[l1];
}
N[l] += k1;
M.b("获得 美金$" + k1, l != 0);
break;
case 2: // '\002'
if(!p())
h();
else
M.b("您不能在这使用卡片.", l != 0);
break;
case 4: // '\004'
c(5);
break;
case 5: // '\005'
c(11);
break;
case 6: // '\006'
int i2;
for(i2 = e(2); i2 == l || o[ad[i2]]; i2 = e(2));
E[i2] += 3;
R[i2] = 0;
M.b("玩家不能移动三回合.", l != 0);
break;
case 7: // '\007'
C = false;
a(e(5) + 1 + 5);
break;
}
}
private void h()
{
for(; ae[A[l]] > 9; ae[A[l]] /= 10);
switch(l)
{
case 2: // '\002'
ae[A[l]] *= 10;
// fall through
case 1: // '\001'
ae[A[l]] *= 10;
// fall through
default:
M.b("此地区目前为您所有.", l != 0);
break;
}
}
private int n()
{
if(l == 0 && g[1][0] == 16 && g[2][0] == 16 || l == 1 && g[0][0] == 16 && g[2][0] == 16 || l == 2 && g[0][0] == 16 && g[1][0] == 16)
return -1;
int i1 = 16;
int j1 = 0;
for(; i1 == 16; i1 = g[j1][e(4)])
for(j1 = e(2); j1 == l; j1 = e(2));
a(j1, i1);
return i1;
}
private void m()
{
boolean flag = false;
int i1 = 0;
do
{
if(i1 >= g[l].length)
break;
if(g[l][i1] == 3)
{
flag = true;
break;
}
i1++;
} while(true);
if(flag)
{
R[l] = 0;
a(l, 3);
} else
{
R[l] += 3;
}
M.c(flag);
}
public void r()
{
l = 0;
M.j = M.f();
G = 0;
for(int i1 = 0; i1 < 3; i1++)
{
A[i1] = 29;
N[i1] = 4500;
R[i1] = 0;
E[i1] = 0;
}
for(int j1 = 0; j1 < 29; j1++)
ae[j1] = 0;
ab = 0;
for(int k1 = 0; k1 < 3; k1++)
{
for(int l1 = 0; l1 < 5; l1++)
g[k1][l1] = 16;
}
H = 0;
m = 0;
a = 6;
}
public void i(int i1)
{
ad[0] = i1;
int j1 = e(2);
int k1 = e(2);
for(; j1 == i1; j1 = e(2));
ad[1] = j1;
for(; k1 == i1 || k1 == j1; k1 = e(2));
ad[2] = k1;
repaint();
}
private int e(int i1)
{
Random random = new Random();
return Math.abs(random.nextInt() % (i1 + 1));
}
void g()
{
int i1 = j();
if(g[l][0] != 16 && i1 != -1)
{
ab = 1;
repaint();
serviceRepaints();
try
{
Thread.sleep(80L);
}
catch(Exception exception) { }
M.h(i1);
} else
{
a(e(5) + 1 + 5);
}
}
private int j()
{
int i1 = 0;
for(int j1 = 0; j1 < 5; j1++)
if(g[l][j1] != 16)
i1++;
int k1 = 0;
do
{
if(k1 >= i1)
break;
switch(g[l][k1])
{
case 3: // '\003'
default:
break;
case 2: // '\002'
if(!p())
return k1;
break;
case 0: // '\0'
case 1: // '\001'
case 4: // '\004'
case 5: // '\005'
case 6: // '\006'
case 7: // '\007'
return k1;
}
k1++;
} while(true);
return -1;
}
private boolean p()
{
if(ae[A[l]] == 0)
return true;
else
return l == (ae[A[l]] >= 10 ? ae[A[l]] >= 100 ? 2 : 1 : 0);
}
private void b(int i1)
{
RichmanTaiwanMIDlet _tmp = M;
RichmanTaiwanMIDlet.n.a();
if(b != null)
b.cancel();
if(V != null)
V = null;
if(i1 == 1)
{
H = 2;
repaint();
serviceRepaints();
X = M.a(ad[0], m);
} else
{
H = 3;
repaint();
serviceRepaints();
}
}
private void u()
{
Object obj = null;
Object obj1 = null;
J = new Vector();
try
{
y = Image.createImage("/richmant02.png");
z = Image.createImage("/06.png");
W = Image.createImage("/tile.png");
af[0] = Image.createImage("/speaker0.png");
af[1] = Image.createImage("/speaker1.png");
Image image = Image.createImage("/richmant05.png");
for(int i1 = 0; i1 < 2; i1++)
{
Image image1 = Image.createImage(43, 16);
Graphics g1 = image1.getGraphics();
g1.drawImage(image, 0, -i1 * 16, 20);
J.addElement(image1);
}
for(int j1 = 1; j1 < 7; j1++)
J.addElement(Image.createImage("/dice" + j1 + ".png"));
for(int k1 = 0; k1 < 8; k1++)
if(I[k1] == null)
I[k1] = Image.createImage("/card0" + (k1 + 1) + ".png");
P = Image.createImage("/info.png");
image = null;
Object obj2 = null;
for(int l1 = 1; l1 < 19; l1++)
if(l1 < 10)
J.addElement(Image.createImage("/richman0" + l1 + ".png"));
else
J.addElement(Image.createImage("/richman" + l1 + ".png"));
}
catch(Exception exception)
{
System.out.println("map error");
RichmanTaiwanMIDlet.e();
}
System.gc();
}
public void i()
{
try
{
RecordStore recordstore = RecordStore.openRecordStore("RichMan", true);
byte abyte0[] = c();
if(recordstore.getNumRecords() != 1)
recordstore.addRecord(abyte0, 0, abyte0.length);
else
recordstore.setRecord(1, abyte0, 0, abyte0.length);
recordstore.closeRecordStore();
}
catch(Exception exception) { }
}
public void e()
{
a();
RichmanTaiwanMIDlet _tmp = M;
RichmanTaiwanMIDlet.n.a();
M.a();
}
public void a()
{
if(b != null)
{
b.cancel();
b = null;
}
if(V != null)
V = null;
J.removeAllElements();
y = null;
W = null;
z = null;
j = null;
w = (int[][])null;
D = null;
}
public int q()
{
RecordStore recordstore = RecordStore.openRecordStore("RichMan", false);
if(recordstore == null)
return 0;
a(recordstore.getRecord(1));
Exception exception;
if(N[0] < 0 || N[1] < 0 && N[2] < 0)
{
return 1;
} else
{
a(true);
return 2;
}
exception;
exception.printStackTrace();
return 0;
}
public byte[] c()
{
byte abyte0[] = null;
try
{
ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
DataOutputStream dataoutputstream = new DataOutputStream(bytearrayoutputstream);
for(int i1 = 0; i1 < 3; i1++)
{
dataoutputstream.writeInt(A[i1]);
dataoutputstream.writeInt(N[i1]);
dataoutputstream.writeInt(ad[i1]);
dataoutputstream.writeInt(R[i1]);
if(o[ad[i1]])
dataoutputstream.writeInt(1);
else
dataoutputstream.writeInt(0);
}
for(int j1 = 0; j1 < 3; j1++)
{
for(int l1 = 0; l1 < 5; l1++)
dataoutputstream.writeInt(g[j1][l1]);
}
for(int k1 = 0; k1 < ae.length; k1++)
dataoutputstream.writeInt(ae[k1]);
dataoutputstream.writeInt(m);
abyte0 = bytearrayoutputstream.toByteArray();
bytearrayoutputstream.close();
dataoutputstream.close();
}
catch(Exception exception) { }
return abyte0;
}
public void a(byte abyte0[])
{
try
{
ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(abyte0);
DataInputStream datainputstream = new DataInputStream(bytearrayinputstream);
for(int i1 = 0; i1 < 3; i1++)
{
A[i1] = datainputstream.readInt();
N[i1] = datainputstream.readInt();
ad[i1] = datainputstream.readInt();
R[i1] = datainputstream.readInt();
if(datainputstream.readInt() == 1)
o[ad[i1]] = true;
else
o[ad[i1]] = false;
}
for(int j1 = 0; j1 < 3; j1++)
{
for(int l1 = 0; l1 < 5; l1++)
g[j1][l1] = datainputstream.readInt();
}
for(int k1 = 0; k1 < ae.length; k1++)
ae[k1] = datainputstream.readInt();
m = datainputstream.readInt();
bytearrayinputstream.close();
datainputstream.close();
}
catch(Exception exception) { }
}
public void commandAction(Command command, Displayable displayable)
{
if(H != 1 && (l != 0 || s))
return;
if(command.getCommandType() == 4)
if(H != 1)
{
if(ab == 0)
{
a(e(5) + 1 + 5);
s = true;
} else
if(ab == 1)
{
if(g[l][0] == 16)
M.p();
else
M.c(0);
} else
if(ab == 2)
{
H = 1;
B = 1;
}
} else
if(H == 1)
if(B == 1)
{
if(k == 0)
{
B = 0;
H = 0;
} else
if(k == 1)
{
M.b(false);
B = 0;
H = 0;
} else
if(k == 2)
{
B = 2;
RichmanTaiwanMIDlet _tmp = M;
if(RichmanTaiwanMIDlet.l)
x = 0;
else
x = 1;
} else
if(k == 3)
{
i();
if(n != null)
removeCommand(n);
if(aa != null)
removeCommand(aa);
e();
repaint();
serviceRepaints();
}
} else
if(B == 2)
{
if(x == 0)
{
RichmanTaiwanMIDlet _tmp1 = M;
RichmanTaiwanMIDlet.l = true;
RichmanTaiwanMIDlet _tmp2 = M;
RichmanTaiwanMIDlet.n.a("/sound/02-bgm.mid", -1);
M.i(1);
} else
{
RichmanTaiwanMIDlet _tmp3 = M;
RichmanTaiwanMIDlet.l = false;
RichmanTaiwanMIDlet _tmp4 = M;
RichmanTaiwanMIDlet.n.a();
M.i(0);
}
B = 0;
H = 0;
}
if(command.getCommandType() == 2 && H == 1 && ab == 2)
if(B == 1)
{
H = 0;
B = 0;
} else
if(B == 2)
B = 1;
repaint();
serviceRepaints();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -