mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-02-23 15:38:29 +01:00
Code reformat: Ctor arguments should be one arg per line
* Vertical list makes it easier to version control additions and removals of single parameters
This commit is contained in:
@@ -14,7 +14,11 @@ public final class ActorCondition {
|
||||
public int magnitude;
|
||||
public int duration;
|
||||
|
||||
public ActorCondition(ActorConditionType conditionType, int magnitude, int duration) {
|
||||
public ActorCondition(
|
||||
ActorConditionType conditionType
|
||||
, int magnitude
|
||||
, int duration
|
||||
) {
|
||||
this.conditionType = conditionType;
|
||||
this.magnitude = magnitude;
|
||||
this.duration = duration;
|
||||
|
||||
@@ -8,7 +8,12 @@ public final class ActorConditionEffect {
|
||||
public final int duration;
|
||||
public final ConstRange chance;
|
||||
|
||||
public ActorConditionEffect(ActorConditionType conditionType, int magnitude, int duration, ConstRange chance) {
|
||||
public ActorConditionEffect(
|
||||
ActorConditionType conditionType
|
||||
, int magnitude
|
||||
, int duration
|
||||
, ConstRange chance
|
||||
) {
|
||||
this.conditionType = conditionType;
|
||||
this.magnitude = magnitude;
|
||||
this.duration = duration;
|
||||
|
||||
@@ -19,15 +19,16 @@ public final class ActorConditionType {
|
||||
public final AbilityModifierTraits abilityEffect;
|
||||
|
||||
public ActorConditionType(
|
||||
String conditionTypeID,
|
||||
String name,
|
||||
int iconID,
|
||||
ConditionCategory conditionCategory,
|
||||
boolean isStacking,
|
||||
boolean isPositive,
|
||||
StatsModifierTraits statsEffect_everyRound,
|
||||
StatsModifierTraits statsEffect_everyFullRound,
|
||||
AbilityModifierTraits abilityEffect) {
|
||||
String conditionTypeID
|
||||
, String name
|
||||
, int iconID
|
||||
, ConditionCategory conditionCategory
|
||||
, boolean isStacking
|
||||
, boolean isPositive
|
||||
, StatsModifierTraits statsEffect_everyRound
|
||||
, StatsModifierTraits statsEffect_everyFullRound
|
||||
, AbilityModifierTraits abilityEffect
|
||||
) {
|
||||
this.conditionTypeID = conditionTypeID;
|
||||
this.name = name;
|
||||
this.iconID = iconID;
|
||||
|
||||
@@ -14,7 +14,12 @@ public final class SkillInfo {
|
||||
public final int maxLevel;
|
||||
public final LevelUpType levelupVisibility;
|
||||
public final SkillLevelRequirement[] levelupRequirements;
|
||||
public SkillInfo(SkillCollection.SkillID id, int maxLevel, LevelUpType levelupVisibility, SkillLevelRequirement[] levelupRequirements) {
|
||||
public SkillInfo(
|
||||
SkillCollection.SkillID id
|
||||
, int maxLevel
|
||||
, LevelUpType levelupVisibility
|
||||
, SkillLevelRequirement[] levelupRequirements
|
||||
) {
|
||||
this.id = id;
|
||||
this.maxLevel = maxLevel;
|
||||
this.levelupVisibility = levelupVisibility;
|
||||
|
||||
@@ -17,19 +17,19 @@ public final class AbilityModifierTraits {
|
||||
public final int increaseDamageResistance;
|
||||
|
||||
public AbilityModifierTraits(
|
||||
int increaseMaxHP,
|
||||
int increaseMaxAP,
|
||||
int increaseMoveCost,
|
||||
int increaseUseItemCost,
|
||||
int increaseReequipCost,
|
||||
int increaseAttackCost,
|
||||
int increaseAttackChance,
|
||||
int increaseBlockChance,
|
||||
int increaseMinDamage,
|
||||
int increaseMaxDamage,
|
||||
int increaseCriticalSkill,
|
||||
float setCriticalMultiplier,
|
||||
int increaseDamageResistance
|
||||
int increaseMaxHP
|
||||
, int increaseMaxAP
|
||||
, int increaseMoveCost
|
||||
, int increaseUseItemCost
|
||||
, int increaseReequipCost
|
||||
, int increaseAttackCost
|
||||
, int increaseAttackChance
|
||||
, int increaseBlockChance
|
||||
, int increaseMinDamage
|
||||
, int increaseMaxDamage
|
||||
, int increaseCriticalSkill
|
||||
, float setCriticalMultiplier
|
||||
, int increaseDamageResistance
|
||||
) {
|
||||
this.increaseMaxHP = increaseMaxHP;
|
||||
this.increaseMaxAP = increaseMaxAP;
|
||||
|
||||
@@ -11,7 +11,8 @@ public final class StatsModifierTraits {
|
||||
public StatsModifierTraits(
|
||||
VisualEffectCollection.VisualEffectID visualEffectID
|
||||
, ConstRange currentHPBoost
|
||||
, ConstRange currentAPBoost) {
|
||||
, ConstRange currentAPBoost
|
||||
) {
|
||||
this.visualEffectID = visualEffectID;
|
||||
this.currentHPBoost = currentHPBoost;
|
||||
this.currentAPBoost = currentAPBoost;
|
||||
|
||||
@@ -35,7 +35,11 @@ public class Actor {
|
||||
public int damageResistance;
|
||||
public ItemTraits_OnUse[] onHitEffects;
|
||||
|
||||
public Actor(Size tileSize, boolean isPlayer, boolean isImmuneToCriticalHits) {
|
||||
public Actor(
|
||||
Size tileSize
|
||||
, boolean isPlayer
|
||||
, boolean isImmuneToCriticalHits
|
||||
) {
|
||||
this.tileSize = tileSize;
|
||||
this.rectPosition = new CoordRect(this.position, this.tileSize);
|
||||
this.isPlayer = isPlayer;
|
||||
|
||||
@@ -49,29 +49,30 @@ public final class MonsterType {
|
||||
public final ItemTraits_OnUse[] onHitEffects;
|
||||
|
||||
public MonsterType(
|
||||
String id,
|
||||
String name,
|
||||
String spawnGroup,
|
||||
int exp,
|
||||
DropList dropList,
|
||||
String phraseID,
|
||||
boolean isUnique,
|
||||
String faction,
|
||||
MonsterClass monsterClass,
|
||||
AggressionType aggressionType,
|
||||
Size tileSize,
|
||||
int iconID,
|
||||
int maxAP,
|
||||
int maxHP,
|
||||
int moveCost,
|
||||
int attackCost,
|
||||
int attackChance,
|
||||
int criticalSkill,
|
||||
float criticalMultiplier,
|
||||
ConstRange damagePotential,
|
||||
int blockChance,
|
||||
int damageResistance,
|
||||
ItemTraits_OnUse[] onHitEffects) {
|
||||
String id
|
||||
, String name
|
||||
, String spawnGroup
|
||||
, int exp
|
||||
, DropList dropList
|
||||
, String phraseID
|
||||
, boolean isUnique
|
||||
, String faction
|
||||
, MonsterClass monsterClass
|
||||
, AggressionType aggressionType
|
||||
, Size tileSize
|
||||
, int iconID
|
||||
, int maxAP
|
||||
, int maxHP
|
||||
, int moveCost
|
||||
, int attackCost
|
||||
, int attackChance
|
||||
, int criticalSkill
|
||||
, float criticalMultiplier
|
||||
, ConstRange damagePotential
|
||||
, int blockChance
|
||||
, int damageResistance
|
||||
, ItemTraits_OnUse[] onHitEffects
|
||||
) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.spawnGroup = spawnGroup;
|
||||
|
||||
@@ -10,9 +10,9 @@ public final class Phrase {
|
||||
|
||||
public Phrase(
|
||||
String message
|
||||
,Reply[] replies
|
||||
,Reward[] rewards
|
||||
,String switchToNPC
|
||||
, Reply[] replies
|
||||
, Reward[] rewards
|
||||
, String switchToNPC
|
||||
) {
|
||||
this.message = message;
|
||||
if (replies == null || replies.length == 0) replies = NO_REPLIES;
|
||||
|
||||
@@ -11,7 +11,11 @@ public final class Reply {
|
||||
return requires != null;
|
||||
}
|
||||
|
||||
public Reply(String text, String nextPhrase, Requirement[] requires) {
|
||||
public Reply(
|
||||
String text
|
||||
, String nextPhrase
|
||||
, Requirement[] requires
|
||||
) {
|
||||
this.text = text;
|
||||
this.nextPhrase = nextPhrase;
|
||||
this.requires = requires;
|
||||
|
||||
@@ -15,7 +15,11 @@ public final class Reward {
|
||||
public final String rewardID;
|
||||
public final int value;
|
||||
|
||||
public Reward(RewardType rewardType, String rewardID, int value) {
|
||||
public Reward(
|
||||
RewardType rewardType
|
||||
, String rewardID
|
||||
, int value
|
||||
) {
|
||||
this.rewardType = rewardType;
|
||||
this.rewardID = rewardID;
|
||||
this.value = value;
|
||||
|
||||
@@ -22,7 +22,8 @@ public final class ItemCategory {
|
||||
, String displayName
|
||||
, ActionType actionType
|
||||
, Inventory.WearSlot inventorySlot
|
||||
, ItemCategorySize size) {
|
||||
, ItemCategorySize size
|
||||
) {
|
||||
this.id = id;
|
||||
this.displayName = displayName;
|
||||
this.inventorySlot = inventorySlot;
|
||||
|
||||
@@ -8,8 +8,9 @@ public final class ItemTraits_OnEquip {
|
||||
public final ActorConditionEffect[] addedConditions;
|
||||
|
||||
public ItemTraits_OnEquip(
|
||||
AbilityModifierTraits stats,
|
||||
ActorConditionEffect[] addedConditions) {
|
||||
AbilityModifierTraits stats
|
||||
, ActorConditionEffect[] addedConditions
|
||||
) {
|
||||
this.stats = stats;
|
||||
this.addedConditions = addedConditions;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,11 @@ public final class ItemTraits_OnUse {
|
||||
public final ActorConditionEffect[] addedConditions_source;
|
||||
public final ActorConditionEffect[] addedConditions_target;
|
||||
|
||||
public ItemTraits_OnUse(StatsModifierTraits changedStats, ActorConditionEffect[] addedConditions_source, ActorConditionEffect[] addedConditions_target) {
|
||||
public ItemTraits_OnUse(
|
||||
StatsModifierTraits changedStats
|
||||
, ActorConditionEffect[] addedConditions_source
|
||||
, ActorConditionEffect[] addedConditions_target
|
||||
) {
|
||||
this.changedStats = changedStats;
|
||||
this.addedConditions_source = addedConditions_source;
|
||||
this.addedConditions_target = addedConditions_target;
|
||||
|
||||
@@ -36,18 +36,19 @@ public final class ItemType {
|
||||
public final ItemTraits_OnUse effects_kill;
|
||||
|
||||
public ItemType(
|
||||
String id,
|
||||
int iconID,
|
||||
String name,
|
||||
String description,
|
||||
ItemCategory category,
|
||||
DisplayType displayType,
|
||||
boolean hasManualPrice,
|
||||
int fixedBaseMarketCost,
|
||||
ItemTraits_OnEquip effects_equip,
|
||||
ItemTraits_OnUse effects_use,
|
||||
ItemTraits_OnUse effects_hit,
|
||||
ItemTraits_OnUse effects_kill) {
|
||||
String id
|
||||
, int iconID
|
||||
, String name
|
||||
, String description
|
||||
, ItemCategory category
|
||||
, DisplayType displayType
|
||||
, boolean hasManualPrice
|
||||
, int fixedBaseMarketCost
|
||||
, ItemTraits_OnEquip effects_equip
|
||||
, ItemTraits_OnUse effects_use
|
||||
, ItemTraits_OnUse effects_hit
|
||||
, ItemTraits_OnUse effects_kill
|
||||
) {
|
||||
this.id = id;
|
||||
this.iconID = iconID;
|
||||
this.name = name;
|
||||
|
||||
@@ -17,9 +17,7 @@ public final class Loot {
|
||||
public final boolean isVisible;
|
||||
|
||||
public Loot() {
|
||||
this.items = new ItemContainer();
|
||||
this.position = new Coord();
|
||||
this.isVisible = true;
|
||||
this(true);
|
||||
}
|
||||
public Loot(boolean isVisible) {
|
||||
this.items = new ItemContainer();
|
||||
|
||||
@@ -22,11 +22,12 @@ public final class LayeredTileMap {
|
||||
public final String colorFilter;
|
||||
public final Collection<Integer> usedTileIDs;
|
||||
public LayeredTileMap(
|
||||
Size size,
|
||||
MapSection layout,
|
||||
ReplaceableMapSection[] replacements,
|
||||
String colorFilter,
|
||||
Collection<Integer> usedTileIDs) {
|
||||
Size size
|
||||
, MapSection layout
|
||||
, ReplaceableMapSection[] replacements
|
||||
, String colorFilter
|
||||
, Collection<Integer> usedTileIDs
|
||||
) {
|
||||
this.size = size;
|
||||
this.currentLayout = layout;
|
||||
this.replacements = replacements;
|
||||
|
||||
@@ -42,7 +42,7 @@ public final class MapObject {
|
||||
, final DropList dropList
|
||||
, final MapObjectEvaluationType evaluateWhen
|
||||
, final String group
|
||||
) {
|
||||
) {
|
||||
this.position = new CoordRect(position);
|
||||
this.type = type;
|
||||
this.id = id;
|
||||
@@ -54,22 +54,55 @@ public final class MapObject {
|
||||
this.group = group;
|
||||
}
|
||||
|
||||
public static MapObject createMapSignEvent(final CoordRect position, final String phraseID, String group) {
|
||||
public static MapObject createMapSignEvent(
|
||||
final CoordRect position
|
||||
, final String phraseID
|
||||
, String group
|
||||
) {
|
||||
return new MapObject(position, MapObjectType.sign, phraseID, null, null, null, null, MapObjectEvaluationType.whenEntering, group);
|
||||
}
|
||||
public static MapObject createMapChangeArea(final CoordRect position, final String thisMapTitle, final String destinationMap, final String destinationPlace, String group) {
|
||||
|
||||
public static MapObject createMapChangeArea(
|
||||
final CoordRect position
|
||||
, final String thisMapTitle
|
||||
, final String destinationMap
|
||||
, final String destinationPlace
|
||||
, String group
|
||||
) {
|
||||
return new MapObject(position, MapObjectType.newmap, thisMapTitle, destinationMap, destinationPlace, null, null, MapObjectEvaluationType.whenEntering, group);
|
||||
}
|
||||
public static MapObject createRestArea(final CoordRect position, final String placeId, String group) {
|
||||
|
||||
public static MapObject createRestArea(
|
||||
final CoordRect position
|
||||
, final String placeId
|
||||
, String group
|
||||
) {
|
||||
return new MapObject(position, MapObjectType.rest, placeId, null, null, null, null, MapObjectEvaluationType.whenEntering, group);
|
||||
}
|
||||
public static MapObject createKeyArea(final CoordRect position, final String phraseID, final Requirement enteringRequirement, String group) {
|
||||
|
||||
public static MapObject createKeyArea(
|
||||
final CoordRect position
|
||||
, final String phraseID
|
||||
, final Requirement enteringRequirement
|
||||
, String group
|
||||
) {
|
||||
return new MapObject(position, MapObjectType.keyarea, phraseID, null, null, enteringRequirement, null, MapObjectEvaluationType.whenEntering, group);
|
||||
}
|
||||
public static MapObject createContainerArea(final CoordRect position, final DropList dropList, String group) {
|
||||
|
||||
public static MapObject createContainerArea(
|
||||
final CoordRect position
|
||||
, final DropList dropList
|
||||
, String group
|
||||
) {
|
||||
return new MapObject(position, MapObjectType.container, null, null, null, null, dropList, MapObjectEvaluationType.whenEntering, group);
|
||||
}
|
||||
public static MapObject createScriptArea(final CoordRect position, final String phraseID, final MapObjectEvaluationType evaluateWhen, String group) {
|
||||
|
||||
public static MapObject createScriptArea(
|
||||
final CoordRect position
|
||||
, final String phraseID
|
||||
, final MapObjectEvaluationType evaluateWhen
|
||||
, String group
|
||||
) {
|
||||
return new MapObject(position, MapObjectType.script, phraseID, null, null, null, null, evaluateWhen, group);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,11 +11,12 @@ public final class MapSection {
|
||||
private final byte[] layoutHash;
|
||||
|
||||
public MapSection(
|
||||
MapLayer layerGround,
|
||||
MapLayer layerObjects,
|
||||
MapLayer layerAbove,
|
||||
boolean[][] isWalkable,
|
||||
byte[] layoutHash) {
|
||||
MapLayer layerGround
|
||||
, MapLayer layerObjects
|
||||
, MapLayer layerAbove
|
||||
, boolean[][] isWalkable
|
||||
, byte[] layoutHash
|
||||
) {
|
||||
this.layerGround = layerGround;
|
||||
this.layerObjects = layerObjects;
|
||||
this.layerAbove = layerAbove;
|
||||
|
||||
@@ -23,7 +23,14 @@ public final class MonsterSpawnArea {
|
||||
public final String group;
|
||||
public boolean isActive = true;
|
||||
|
||||
public MonsterSpawnArea(CoordRect area, Range quantity, Range spawnChance, String[] monsterTypeIDs, boolean isUnique, String group) {
|
||||
public MonsterSpawnArea(
|
||||
CoordRect area
|
||||
, Range quantity
|
||||
, Range spawnChance
|
||||
, String[] monsterTypeIDs
|
||||
, boolean isUnique
|
||||
, String group
|
||||
) {
|
||||
this.area = area;
|
||||
this.quantity = quantity;
|
||||
this.spawnChance = spawnChance;
|
||||
|
||||
@@ -35,7 +35,14 @@ public final class PredefinedMap {
|
||||
|
||||
public final ArrayList<BloodSplatter> splatters = new ArrayList<BloodSplatter>();
|
||||
|
||||
public PredefinedMap(int xmlResourceId, String name, Size size, MapObject[] eventObjects, MonsterSpawnArea[] spawnAreas, boolean isOutdoors) {
|
||||
public PredefinedMap(
|
||||
int xmlResourceId
|
||||
, String name
|
||||
, Size size
|
||||
, MapObject[] eventObjects
|
||||
, MonsterSpawnArea[] spawnAreas
|
||||
, boolean isOutdoors
|
||||
) {
|
||||
this.xmlResourceId = xmlResourceId;
|
||||
this.name = name;
|
||||
this.size = size;
|
||||
@@ -144,7 +151,7 @@ public final class PredefinedMap {
|
||||
groundBags.remove(loot);
|
||||
}
|
||||
public void resetForNewGame() {
|
||||
for(MonsterSpawnArea a : spawnAreas) {
|
||||
for (MonsterSpawnArea a : spawnAreas) {
|
||||
a.resetForNewGame();
|
||||
}
|
||||
resetTemporaryData();
|
||||
|
||||
@@ -11,10 +11,11 @@ public final class ReplaceableMapSection {
|
||||
public final String group;
|
||||
|
||||
public ReplaceableMapSection(
|
||||
CoordRect replacementArea,
|
||||
MapSection replaceLayersWith,
|
||||
QuestProgress requireQuestStage,
|
||||
String group) {
|
||||
CoordRect replacementArea
|
||||
, MapSection replaceLayersWith
|
||||
, QuestProgress requireQuestStage
|
||||
, String group
|
||||
) {
|
||||
this.replacementArea = replacementArea;
|
||||
this.replaceLayersWith = replaceLayersWith;
|
||||
this.requireQuestStage = requireQuestStage;
|
||||
|
||||
@@ -11,7 +11,13 @@ public final class Quest implements Comparable<Quest> {
|
||||
public final boolean showInLog;
|
||||
public final int sortOrder;
|
||||
|
||||
public Quest(String questID, String name, QuestLogEntry[] stages, boolean showInLog, int sortOrder) {
|
||||
public Quest(
|
||||
String questID
|
||||
, String name
|
||||
, QuestLogEntry[] stages
|
||||
, boolean showInLog
|
||||
, int sortOrder
|
||||
) {
|
||||
this.questID = questID;
|
||||
this.name = name;
|
||||
this.stages = stages;
|
||||
|
||||
@@ -6,7 +6,12 @@ public final class QuestLogEntry {
|
||||
public final int rewardExperience;
|
||||
public final boolean finishesQuest;
|
||||
|
||||
public QuestLogEntry(int progress, String logtext, int rewardExperience, boolean finishesQuest) {
|
||||
public QuestLogEntry(
|
||||
int progress
|
||||
, String logtext
|
||||
, int rewardExperience
|
||||
, boolean finishesQuest
|
||||
) {
|
||||
this.progress = progress;
|
||||
this.logtext = logtext;
|
||||
this.rewardExperience = rewardExperience;
|
||||
|
||||
@@ -20,7 +20,12 @@ public final class Requirement {
|
||||
public final int value;
|
||||
public final boolean negate;
|
||||
|
||||
public Requirement(RequirementType requireType, String requireID, int value, boolean negate) {
|
||||
public Requirement(
|
||||
RequirementType requireType
|
||||
, String requireID
|
||||
, int value
|
||||
, boolean negate
|
||||
) {
|
||||
this.requireType = requireType;
|
||||
this.requireID = requireID;
|
||||
this.value = value;
|
||||
|
||||
Reference in New Issue
Block a user