📄 game.java.bak
字号:
short word4 = people[j][3];
byte byte2 = objects[word4][2];
short word8 = people[j][2];
if(word8 > 0)
{
if(word8 == production[byte2][1][0])
objects[word4][6]++;
else
if(word8 == production[byte2][2][0])
objects[word4][7]++;
people[j][2] = 0;
}
word4 = people[j][3];
byte2 = objects[word4][2];
if(objects[word4][5] > 0)
{
people[j][9] = 7;
people[j][5] = (short)(gw.gs.castlei * 22);
people[j][6] = (short)(gw.gs.castlej * 22);
people[j][2] = (short)products[objects[word4][2]];
people[j][7] = 0;
objects[word4][5]--;
break;
}
if(objects[word4][6] < production[byte2][1][1] || objects[word4][7] < production[byte2][2][1])
{
people[j][9] = 7;
people[j][5] = (short)(gw.gs.castlei * 22);
people[j][6] = (short)(gw.gs.castlej * 22);
people[j][7] = 0;
people[j][2] = 0;
} else
{
people[j][9] = 0;
}
} else
{
people[j][9] = 0;
}
break;
case 3: // '\003'
short word2 = people[j][8];
short word5 = people[j][3];
if(word2 == 1 || word2 == 3)
{
if(word2 == 1)
l = findResource(objects[people[j][3]][0], objects[people[j][3]][1], 41);
if(word2 == 3)
l = findStone(objects[people[j][3]][0], objects[people[j][3]][1]);
if(l != 0)
{
people[j][9] = 4;
people[j][5] = (short)((l & 0xff) * 22);
people[j][6] = (short)((l >> 8) * 22);
people[j][7] = 0;
people[j][2] = 0;
} else
{
people[j][9] = 0;
}
break;
}
if(word2 == 0)
{
byte byte0 = objects[people[j][3]][0];
byte byte1 = objects[people[j][3]][1];
l = findFish(byte0, byte1);
if(l == 0)
{
people[j][9] = 0;
} else
{
people[j][9] = 4;
people[j][5] = (short)((l & 0xff) * 22);
people[j][6] = (short)((l + 1 >> 8) * 22);
people[j][7] = 0;
people[j][2] = 0;
}
break;
}
if(word2 < 7 || word2 > 9)
break;
if(objects[word5][6] > 0)
{
objects[word5][6]--;
l = findMine(objects[people[j][3]][0], objects[people[j][3]][1], word2 - 6);
if(l != 0)
{
people[j][9] = 4;
people[j][5] = (short)((l & 0xff) * 22);
people[j][6] = (short)((l >> 8) * 22);
people[j][7] = 0;
people[j][2] = 0;
} else
{
people[j][9] = 0;
}
} else
{
people[j][9] = 0;
}
break;
case 4: // '\004'
if(movePeople(j))
{
people[j][9] = 5;
people[j][4] = 0;
}
break;
case 6: // '\006'
if(movePeople(j))
{
people[j][9] = 3;
short word6 = people[j][3];
objects[word6][5]++;
}
break;
case 7: // '\007'
if(!movePeople(j))
break;
short word7 = people[j][3];
stock[people[j][2]]++;
stock[16] = (short)(stock[7] + stock[8] + stock[14]);
if(objects[word7][5] > 0)
{
people[j][9] = 2;
people[j][5] = (short)(objects[word7][0] * 22);
people[j][6] = (short)(objects[word7][1] * 22);
people[j][7] = 0;
people[j][2] = 0;
} else
{
people[j][9] = 0;
}
break;
}
for(int k = peopleNum - 1; k >= 0; k--)
gw.lv.flags[people[k][11]][people[k][10]] |= 2;
}
catch(Exception exception) { }
}
public static final int BT_DAMBA = 5;
public static final int BT_DROVOSEK = 1;
public static final int BT_FERMA = 15;
public static final int BT_FORT = 16;
public static final int BT_KAMENOTES = 3;
public static final int BT_KOCHEGARKA = 6;
public static final int BT_KOLODEC = 4;
public static final int BT_KUZNEC = 11;
public static final int BT_LESOPILKA = 2;
public static final int BT_MELNICA = 13;
public static final int BT_PEKAR = 14;
public static final int BT_PLAVILJNJA = 10;
public static final int BT_POLE = 12;
public static final int BT_RYBAK = 0;
public static final int BT_UGOLSHAHTA = 7;
public static final int BT_ZHELSHAHTA = 8;
public static final int BT_ZOLSHAHTA = 9;
public static final int OBJECTS_MAX = 120;
public static final int OBJECTS_WIN = 100;
public static final int OB_ANIMATED = 4;
public static final int OB_BUILDDAY = 3;
public static final int OB_I = 0;
public static final int OB_J = 1;
public static final int OB_PRODUCT = 5;
public static final int OB_RES1 = 6;
public static final int OB_RES2 = 7;
public static final int OB_TYPE = 2;
public static final int PEOPLE_MAX = 240;
public static final int PE_ACCDAY = 4;
public static final int PE_BUILDING = 3;
public static final int PE_DIR = 7;
public static final int PE_I = 10;
public static final int PE_J = 11;
public static final int PE_KIND = 8;
public static final int PE_RESOURCE = 2;
public static final int PE_STATE = 9;
public static final int PE_TARGETX = 5;
public static final int PE_TARGETY = 6;
public static final int PE_X = 0;
public static final int PE_Y = 1;
public static final int PK_HELPER = 80;
public static final int PS_2BUILD = 2;
public static final int PS_2CASTLE = 7;
public static final int PS_2RES = 4;
public static final int PS_ACCRES = 5;
public static final int PS_CASTLE = 1;
public static final int PS_EMPTY = 0;
public static final int PS_FINDRES = 3;
public static final int PS_RETURN2BUILD = 6;
public int Plednik;
public int Ppesok;
public int Puragan;
public int Pvoda;
public static final int RS_BREVNA = 1;
public static final int RS_DOSKI = 2;
public static final int RS_EMPTY = 0;
public static final int RS_HLEB = 14;
public static final int RS_INSTRUMENTY = 5;
public static final int RS_KAMNI = 3;
public static final int RS_LJUDI = 15;
public static final int RS_MJASO = 8;
public static final int RS_MUKA = 13;
public static final int RS_PISHA = 16;
public static final int RS_PSHENICA = 12;
public static final int RS_RUDA = 10;
public static final int RS_RYBA = 7;
public static final int RS_UGOL = 9;
public static final int RS_VODA = 6;
public static final int RS_ZHELEZO = 4;
public static final int RS_ZOLOTO = 11;
public static final int accDuration = 3;
public static final int buildDuration = 1;
public int buildsNum;
public int buildsQuantity[];
public boolean byUragan;
public int chapter;
public static final byte forbuild[][][] = {
{
{
2, 1
}, {
0, 0
}, {
0, 0
}
}, {
{
2, 1
}, {
0, 0
}, {
0, 0
}
}, {
{
2, 1
}, {
0, 0
}, {
0, 0
}
}, {
{
2, 1
}, {
0, 0
}, {
0, 0
}
}, {
{
2, 1
}, {
5, 1
}, {
0, 0
}
}, {
{
2, 1
}, {
5, 1
}, {
0, 0
}
}, {
{
2, 1
}, {
3, 1
}, {
0, 0
}
}, {
{
2, 1
}, {
3, 1
}, {
0, 0
}
}, {
{
2, 1
}, {
3, 1
}, {
0, 0
}
}, {
{
2, 1
}, {
3, 1
}, {
0, 0
}
}, {
{
2, 1
}, {
3, 1
}, {
0, 0
}
}, {
{
2, 1
}, {
3, 1
}, {
0, 0
}
}, {
{
2, 1
}, {
0, 0
}, {
0, 0
}
}, {
{
2, 3
}, {
3, 4
}, {
0, 0
}
}, {
{
2, 1
}, {
3, 1
}, {
0, 0
}
}, {
{
2, 3
}, {
3, 1
}, {
0, 0
}
}, {
{
2, 2
}, {
3, 4
}, {
0, 0
}
}
};
public boolean gameover;
Global gw;
public int mission;
public byte objects[][];
public short people[][];
public int peopleNum;
public static final byte production[][][] = {
{
{
0, 0
}, {
0, 0
}, {
0, 0
}
}, {
{
0, 0
}, {
0, 0
}, {
0, 0
}
}, {
{
2, 2
}, {
1, 2
}, {
0, 0
}
}, {
{
0, 0
}, {
0, 0
}, {
0, 0
}
}, {
{
6, 1
}, {
0, 0
}, {
0, 0
}
}, {
{
0, 0
}, {
0, 0
}, {
0, 0
}
}, {
{
0, 0
}, {
9, 1
}, {
0, 0
}
}, {
{
9, 1
}, {
16, 1
}, {
0, 0
}
}, {
{
10, 1
}, {
16, 1
}, {
0, 0
}
}, {
{
11, 1
}, {
16, 1
}, {
0, 0
}
}, {
{
4, 2
}, {
10, 2
}, {
9, 2
}
}, {
{
5, 2
}, {
4, 2
}, {
0, 0
}
}, {
{
12, 2
}, {
6, 1
}, {
5, 1
}
}, {
{
13, 2
}, {
12, 2
}, {
0, 0
}
}, {
{
14, 2
}, {
13, 2
}, {
0, 0
}
}, {
{
8, 4
}, {
12, 1
}, {
6, 1
}
}, {
{
0, 0
}, {
11, 5
}, {
0, 0
}
}
};
public static final int products[] = {
7, 1, 2, 3, 6, 0, 0, 9, 10, 11,
4, 5, 12, 13, 14, 8, 0
};
public RecordStore rStore;
public int resNum;
public int scores;
public short stock[];
public int userid;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -