mirror of
https://github.com/Melledy/Nebula.git
synced 2026-09-19 17:19:58 +02:00
Improve rewards/exp for shadow siege
This commit is contained in:
@@ -85,6 +85,12 @@ public class TraceHuntManager extends PlayerManager implements GameDatabaseObjec
|
|||||||
return GameData.getTraceHuntControlDataTable().get(this.getControlId());
|
return GameData.getTraceHuntControlDataTable().get(this.getControlId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getRandomMedals() {
|
||||||
|
int medals = Utils.randomRange(125, 150);
|
||||||
|
double rate = GameData.getTraceHuntLevelDataTable().get(this.getLevel()).getTokenRate() * 0.01D;
|
||||||
|
return (int) (medals * rate);
|
||||||
|
}
|
||||||
|
|
||||||
public int addTraceRequests(int amount) {
|
public int addTraceRequests(int amount) {
|
||||||
// Add/remove requests
|
// Add/remove requests
|
||||||
this.traceRequests = Math.max(Math.min(this.traceRequests + amount, 60), 0);
|
this.traceRequests = Math.max(Math.min(this.traceRequests + amount, 60), 0);
|
||||||
@@ -158,9 +164,6 @@ public class TraceHuntManager extends PlayerManager implements GameDatabaseObjec
|
|||||||
if (this.getLevel() >= this.getMaxLevel()) {
|
if (this.getLevel() >= this.getMaxLevel()) {
|
||||||
this.exp = 0;
|
this.exp = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save to database
|
|
||||||
this.save();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isHunting() {
|
public boolean isHunting() {
|
||||||
@@ -214,9 +217,9 @@ public class TraceHuntManager extends PlayerManager implements GameDatabaseObjec
|
|||||||
int progress = 0;
|
int progress = 0;
|
||||||
|
|
||||||
if (traceId >= 40) {
|
if (traceId >= 40) {
|
||||||
progress = 2000;
|
|
||||||
} else if (traceId >= 30) {
|
|
||||||
progress = 1000;
|
progress = 1000;
|
||||||
|
} else if (traceId >= 30) {
|
||||||
|
progress = 750;
|
||||||
} else {
|
} else {
|
||||||
progress = 500;
|
progress = 500;
|
||||||
}
|
}
|
||||||
@@ -284,6 +287,9 @@ public class TraceHuntManager extends PlayerManager implements GameDatabaseObjec
|
|||||||
// Add logs to change info
|
// Add logs to change info
|
||||||
change.setExtraData(logs);
|
change.setExtraData(logs);
|
||||||
|
|
||||||
|
// Add exp
|
||||||
|
this.addExp(50);
|
||||||
|
|
||||||
// Calculate result
|
// Calculate result
|
||||||
if (this.huntPlayerUid == this.getPlayerUid()) {
|
if (this.huntPlayerUid == this.getPlayerUid()) {
|
||||||
// Check if we have enough cost items
|
// Check if we have enough cost items
|
||||||
@@ -298,7 +304,7 @@ public class TraceHuntManager extends PlayerManager implements GameDatabaseObjec
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Our own hunts
|
// Our own hunts
|
||||||
int progress = stars * 500;
|
int progress = 3500;
|
||||||
|
|
||||||
logs.add(new TraceHuntLog(11, this.getPlayer().getName(), Integer.toString(progress)));
|
logs.add(new TraceHuntLog(11, this.getPlayer().getName(), Integer.toString(progress)));
|
||||||
|
|
||||||
@@ -314,6 +320,9 @@ public class TraceHuntManager extends PlayerManager implements GameDatabaseObjec
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add medals
|
||||||
|
this.getPlayer().getInventory().addItem(37, this.getRandomMedals(), change);
|
||||||
|
|
||||||
// Success
|
// Success
|
||||||
return change;
|
return change;
|
||||||
}
|
}
|
||||||
@@ -342,12 +351,14 @@ public class TraceHuntManager extends PlayerManager implements GameDatabaseObjec
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add exp
|
||||||
|
this.addExp(250);
|
||||||
|
|
||||||
// Save
|
// Save
|
||||||
this.save();
|
this.save();
|
||||||
|
|
||||||
// Success
|
// Success
|
||||||
// Test amount of items
|
return this.getPlayer().getInventory().addItem(37, this.getRandomMedals());
|
||||||
return this.getPlayer().getInventory().addItem(37, 1000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Proto
|
// Proto
|
||||||
|
|||||||
Reference in New Issue
Block a user