Skip to content

Commit d44918a

Browse files
author
Chun-Yi
committed
Merge pull request #14 from wingzero0/master
調了一些參數
2 parents d2143f2 + 8ce58fd commit d44918a

File tree

4 files changed

+24
-15
lines changed

4 files changed

+24
-15
lines changed

AIControl.cpp

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ void AIControl::PlayAction(int skip){
4242
}
4343
void AIControl::moveTowardLyubu() {
4444
for (int i = 0;i< this->npcStateMachineList.size(); i++){
45-
if (this->npcStateMachineList[i]->state == STATEDIE){
46-
47-
}
4845
if (npcStateMachineList[i]->CanBeControl() == FALSE){
4946
continue;
5047
}
@@ -121,11 +118,21 @@ void AIControl::moveTowardLyubu() {
121118
//sprintf(debug, "%s distance = %f\n",debug,distance);
122119
srand ( time(NULL) + i);
123120
float rate = rand() % 100;
124-
if (rate > GUARD_RATE) {
125-
npcStateMachineList[i]->AppendAttackCode(NORMAL_ATT);
126-
}
127-
else {
128-
npcStateMachineList[i]->CharacterSetGuard();
121+
if (this->npcStateMachineList[i] == this->bossStateMachine){
122+
if (rate > GUARD_RATE ) {
123+
npcStateMachineList[i]->AppendAttackCode(NORMAL_ATT);
124+
npcStateMachineList[i]->AppendAttackCode(NORMAL_ATT);
125+
npcStateMachineList[i]->AppendAttackCode(HEAVY_ATT);
126+
}else{
127+
npcStateMachineList[i]->CharacterSetGuard();
128+
}
129+
}else {
130+
if (rate > GUARD_RATE * 2) {
131+
npcStateMachineList[i]->AppendAttackCode(NORMAL_ATT);
132+
}
133+
else{
134+
npcStateMachineList[i]->CharacterSetIdle();
135+
}
129136
}
130137
}
131138
else {

Data/DozonAction.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
Run Run
22
CombatIdle CombatIdle
33
N1 AttackL1
4-
N2 AttackL1
5-
N3 AttackL2
6-
N4 AttackH
4+
N2 AttackL2
5+
N3 AttackH
76
H1 AttackH
7+
H2 AttackH
8+
H3 HeavyAttack
89
HeavyDamage DamageH
910
LightDamage DamageL
1011
Die Die

Data/Robber02Action.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ N2 NormalAttack1
55
N3 NormalAttack2
66
N4 HeavyAttack1
77
H1 HeavyAttack1
8-
HeavyDamage Damage2
9-
LightDamage Damage1
10-
Die Dead
8+
HeavyDamage Damage1
9+
LightDamage Damage2
10+
Die Dead
11+
Guard Dead

GameControl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#define FLOAT_ERROR 0.001
55
#define MOVE_LENGTH 10.0
6-
#define CAM_MIN_HIGHT 115.0f
6+
#define CAM_MIN_HIGHT 80.0f
77
#define CAM_MAX_HIGHT 300.0f
88
extern char debug[1024];
99
extern OBJECTid tID;

0 commit comments

Comments
 (0)