Skip to content

Commit b22f3bd

Browse files
new timeline fixes - wip
1 parent ee49435 commit b22f3bd

File tree

7 files changed

+8
-17
lines changed

7 files changed

+8
-17
lines changed

RemixedDungeon/src/main/assets/hero/initHeroesDebug.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
{
22
"common": {
3-
"armor": {
4-
"kind": "GothicArmor",
5-
"identified": true,
6-
"level": 10
7-
},
83
"allies" : [
94
{
105
"kind" : "Rat",
@@ -39,7 +34,7 @@
3934
"sp": 100,
4035
"maxSp": 100,
4136
"sl": 10,
42-
"lvl": 30
37+
"lvl": 5
4338
},
4439
"non_expert": {
4540
"items": [

RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/ai/Hunting.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public Hunting() { }
1616
public void act(@NotNull Char me) {
1717

1818
if(returnToOwnerIfTooFar(me, 6)) {
19-
me.spend(Actor.MICRO_TICK);
2019
return;
2120
}
2221

@@ -28,6 +27,7 @@ public void act(@NotNull Char me) {
2827

2928
if(me.friendly(enemy)) {
3029
me.setState(getStateByClass(Wandering.class));
30+
me.spend(Actor.TICK);
3131
return;
3232
}
3333

RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/ai/MobAi.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ public boolean returnToOwnerIfTooFar(@NotNull Char me, int maxDist) {
163163
) {
164164
me.setTarget(ownerPos);
165165
me.setState(getStateByClass(Wandering.class));
166+
167+
if(!me.doStepTo(me.getTarget())) {
168+
me.spend(Actor.TICK);
169+
}
170+
166171
return true;
167172
}
168173
return false;

RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/ai/Wandering.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public Wandering(){ }
1616
public void act(@NotNull Char me) {
1717

1818
if(returnToOwnerIfTooFar(me, 2)) {
19-
me.spend(Actor.MICRO_TICK);
2019
return;
2120
}
2221

RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/Actor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public static void processTurnBased(float elapsed) {
226226
}
227227
}
228228

229-
GLog.debug("actor %s %4.1f hero: %4.1f now: %4.1f", current, current.time, hero.actorTime(), now);
229+
GLog.debug("actor %s %4.1f hero: %4.1f now: %4.1f", current.getEntityKind(), current.time, hero.actorTime(), now);
230230

231231
if (current != hero) {
232232
current.act();

RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/Char.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,6 @@ public void setState(@NotNull AiState state) {
14201420
//GLog.debug("%s now will %s, was doing %s before", getEntityKind(), this.state.getTag(), state.getTag());
14211421
this.state = state;
14221422
}
1423-
spend(Actor.MICRO_TICK);
14241423
}
14251424

14261425
public void onSpawn(Level level) {

RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/mobs/Mob.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,6 @@ public CharSprite newSprite() {
187187

188188
@Override
189189
public boolean act() {
190-
/*
191-
if(Util.isDebug() && !(this instanceof NPC) && !getEntityKind().contains("NPC") && !getEntityKind().contains("Npc")) {
192-
if(!(baseAttackSkill > 0 && baseDefenseSkill > 0)) {
193-
throw new RuntimeException(Utils.format("bad params for %s", getEntityKind()));
194-
}
195-
}
196-
*/
197190
super.act(); //Calculate FoV
198191

199192
getSprite().hideAlert();

0 commit comments

Comments
 (0)