Fix whitespace [skip actions]

This commit is contained in:
github-actions
2022-08-21 11:33:54 +00:00
parent a746d11b6f
commit c517b8a2c9
919 changed files with 754457 additions and 3136 deletions

View File

@@ -54,36 +54,36 @@ public class BlossomActivity {
challengeTriggers.add(new KillMonsterTrigger());
//this.challengeTriggers.add(new InTimeTrigger());
}
public WorldChallenge getChallenge(){
public WorldChallenge getChallenge() {
return this.challenge;
}
public void setMonsters(List<EntityMonster> monsters) {
this.activeMonsters.clear();
this.activeMonsters.addAll(monsters);
for(EntityMonster monster : monsters){
for (EntityMonster monster : monsters) {
monster.setGroupId(this.tempSceneGroup.id);
}
}
public int getAliveMonstersCount(){
public int getAliveMonstersCount() {
int count=0;
for(EntityMonster monster: activeMonsters) {
if(monster.isAlive()){
for (EntityMonster monster: activeMonsters) {
if (monster.isAlive()) {
count++;
}
}
return count;
}
public boolean getPass(){
public boolean getPass() {
return pass;
}
public void start(){
public void start() {
challenge.start();
}
public void onTick() {
Scene scene = gadget.getScene();
Position pos = gadget.getPosition();
if(getAliveMonstersCount() <= 2){
if(generatedCount<goal){
if (getAliveMonstersCount() <= 2) {
if (generatedCount<goal) {
step++;
WorldLevelData worldLevelData = GameData.getWorldLevelDataMap().get(worldLevel);
@@ -94,7 +94,7 @@ public class BlossomActivity {
List<EntityMonster> newMonsters = new ArrayList<>();
int willSpawn = Utils.randomRange(3,5);
if(generatedCount+willSpawn>goal){
if (generatedCount+willSpawn>goal) {
willSpawn = goal - generatedCount;
}
generatedCount+=willSpawn;
@@ -106,19 +106,19 @@ public class BlossomActivity {
newMonsters.add(entity);
}
setMonsters(newMonsters);
}else{
if(getAliveMonstersCount() == 0) {
}else {
if (getAliveMonstersCount() == 0) {
this.pass = true;
this.challenge.done();
}
}
}
}
public EntityGadget getGadget(){
public EntityGadget getGadget() {
return gadget;
}
public EntityGadget getChest(){
if(chest==null) {
public EntityGadget getChest() {
if (chest==null) {
EntityGadget rewardGadget = new EntityGadget(gadget.getScene(), BLOOMING_GADGET_ID, gadget.getPosition());
SceneGadget metaGadget = new SceneGadget();
metaGadget.boss_chest = new SceneBossChest();

View File

@@ -37,10 +37,10 @@ public class BlossomManager {
private final List<SpawnDataEntry> blossomConsumed = new ArrayList<>();
public void onTick(){
synchronized (blossomActivities){
public void onTick() {
synchronized (blossomActivities) {
var it = blossomActivities.iterator();
while(it.hasNext()){
while (it.hasNext()) {
var active = it.next();
active.onTick();
if (active.getPass()) {
@@ -54,24 +54,24 @@ public class BlossomManager {
}
}
public void recycleGadgetEntity(List<GameEntity> entities){
for(var entity : entities){
if(entity instanceof EntityGadget gadget){
public void recycleGadgetEntity(List<GameEntity> entities) {
for (var entity : entities) {
if (entity instanceof EntityGadget gadget) {
createdEntity.remove(gadget);
}
}
notifyIcon();
}
public void initBlossom(EntityGadget gadget){
if(createdEntity.contains(gadget)){
public void initBlossom(EntityGadget gadget) {
if (createdEntity.contains(gadget)) {
return;
}
if(blossomConsumed.contains(gadget.getSpawnEntry())){
if (blossomConsumed.contains(gadget.getSpawnEntry())) {
return;
}
var id = gadget.getGadgetId();
if(BlossomType.valueOf(id)==null){
if (BlossomType.valueOf(id)==null) {
return;
}
gadget.buildContent();
@@ -91,19 +91,19 @@ public class BlossomManager {
int volume=0;
IntList monsters = new IntArrayList();
while(true){
while (true) {
var remain = GameDepot.getBlossomConfig().getMonsterFightingVolume() - volume;
if(remain<=0){
if (remain<=0) {
break;
}
var rand = Utils.randomRange(1,100);
if(rand>85 && remain>=50){//15% ,generate strong monster
if (rand>85 && remain>=50) {//15% ,generate strong monster
monsters.addAll(getRandomMonstersID(2,1));
volume+=50;
}else if(rand>50 && remain>=20) {//35% ,generate normal monster
}else if (rand>50 && remain>=20) {//35% ,generate normal monster
monsters.addAll(getRandomMonstersID(1,1));
volume+=20;
}else{//50% ,generate weak monster
}else {//50% ,generate weak monster
monsters.addAll(getRandomMonstersID(0,1));
volume+=10;
}
@@ -155,7 +155,7 @@ public class BlossomManager {
scene.broadcastPacket(new PacketBlossomBriefInfoNotify(blossoms));
}
public int getWorldLevel(){
public int getWorldLevel() {
return scene.getWorld().getWorldLevel();
}
@@ -226,10 +226,10 @@ public class BlossomManager {
return null;
}
public static IntList getRandomMonstersID(int difficulty,int count){
public static IntList getRandomMonstersID(int difficulty,int count) {
IntList result = new IntArrayList();
List<Integer> monsters = GameDepot.getBlossomConfig().getMonsterIdsPerDifficulty().get(difficulty);
for(int i=0; i<count; i++){
for (int i=0; i<count; i++) {
result.add((int) monsters.get(Utils.randomRange(0, monsters.size()-1)));
}
return result;