Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
meow-fish committed Mar 9, 2024
2 parents e686c22 + 4750778 commit f7c4bbd
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 8 deletions.
14 changes: 12 additions & 2 deletions ArcaeaTools/InputView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ struct GetStepView: View {
@State private var partnerstep = ""
@State private var staminaBoost = ""
@State private var fragmentBoost = ""
@State private var length = ""
@State private var memoryBoost = false
@State private var legacy = false
@ViewBuilder var body: some View {
Form{
VStack{
Expand All @@ -119,7 +121,8 @@ struct GetStepView: View {
.padding(.horizontal, 10)
TextField("Partner Step Stats", text: $partnerstep)
.padding(.horizontal, 10)

TextField("Map Length", text: $length)
.padding(.horizontal, 10)
Picker("Fragment Boost", selection: $selectedFragmentBoost) {
Text("None").tag(FragmentBoost.none)
Text("x1.1").tag(FragmentBoost.oneone)
Expand All @@ -136,10 +139,17 @@ struct GetStepView: View {
.padding(.horizontal, 10)

Toggle("Memory Boost", isOn: $memoryBoost)
Toggle("Legacy Chapter", isOn: $legacy)

LabeledContent("Play Rating", value: String(stepWorld(Score: Double(score) ?? 0, Constant: Double(constant) ?? 0, PartnerStep: Double(partnerstep) ?? 0, staminaBoost: selectedStaminaBoost.rawValue, fragmentBoost: selectedFragmentBoost.rawValue, memoryBoost: memoryBoost)))
LabeledContent("Step", value: String(stepWorld(Score: Double(score) ?? 0, Constant: Double(constant) ?? 0, PartnerStep: Double(partnerstep) ?? 0, staminaBoost: selectedStaminaBoost.rawValue, fragmentBoost: selectedFragmentBoost.rawValue, memoryBoost: memoryBoost)))
.padding(.horizontal, 10)

LabeledContent("Amount of Stamina", value: String(stepWorldRoundStamina(Score: Double(score) ?? 0, Constant: Double(constant) ?? 0, PartnerStep: Double(partnerstep) ?? 0, staminaBoost: selectedStaminaBoost.rawValue, Length: Double(length) ?? 0, fragmentBoost: selectedFragmentBoost.rawValue, memoryBoost: memoryBoost, Legacy: legacy, getStamina: true, getRound: false)))
.padding(.horizontal, 10)

LabeledContent("Amount of Round", value: String(stepWorldRoundStamina(Score: Double(score) ?? 0, Constant: Double(constant) ?? 0, PartnerStep: Double(partnerstep) ?? 0, staminaBoost: selectedStaminaBoost.rawValue, Length: Double(length) ?? 0, fragmentBoost: selectedFragmentBoost.rawValue, memoryBoost: memoryBoost, Legacy: legacy, getStamina: false, getRound: true)))
.padding(.horizontal, 10)

}

}
Expand Down
17 changes: 14 additions & 3 deletions ArcaeaTools/WorldMode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,20 @@ func stepBeyond (Score:Double, Constant:Double, PartnerOver:Double, fragmentBoos
return Progression
}

func stepWorldRound (Score:Double, Constant:Double, PartnerStep:Double, staminaBoost:Double,Length:Double, fragmentBoost:Double, memoryBoost:Bool) -> Double{
func stepWorldRoundStamina (Score:Double, Constant:Double, PartnerStep:Double, staminaBoost:Double,Length:Double, fragmentBoost:Double, memoryBoost:Bool, Legacy:Bool, getStamina:Bool, getRound:Bool) -> Double{
var Step = stepWorld (Score:Score, Constant:Constant, PartnerStep:PartnerStep, staminaBoost:staminaBoost, fragmentBoost:fragmentBoost, memoryBoost:memoryBoost)

var StaminaCost:Double
var Round = Length/Step
return Round
switch Legacy{
case true:
StaminaCost = Round*staminaBoost
case false:
StaminaCost = Round*2
}
if getStamina{
return StaminaCost
}else{
return Round
}

}
77 changes: 74 additions & 3 deletions Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,34 @@
"sourceLanguage" : "en",
"strings" : {
"" : {

"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : ""
}
}
}
},
"Amount of Round" : {
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "局数"
}
}
}
},
"Amount of Stamina" : {
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "体力消耗"
}
}
}
},
"Beyond Boost" : {
"extractionState" : "manual",
Expand Down Expand Up @@ -190,6 +217,26 @@
}
}
},
"Legacy Chapter" : {
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "过去章节"
}
}
}
},
"Map Length" : {
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "梯子长度"
}
}
}
},
"Memory Boost" : {
"extractionState" : "manual",
"localizations" : {
Expand Down Expand Up @@ -265,6 +312,16 @@
}
}
},
"Step" : {
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "步数"
}
}
}
},
"Target Play Rating" : {
"extractionState" : "manual",
"localizations" : {
Expand All @@ -277,7 +334,14 @@
}
},
"Target Score" : {

"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "目标分数"
}
}
}
},
"Tools" : {
"localizations" : {
Expand Down Expand Up @@ -311,7 +375,14 @@
}
},
"x1.5" : {

"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "1.5倍"
}
}
}
},
"x1.25" : {
"localizations" : {
Expand Down

0 comments on commit f7c4bbd

Please sign in to comment.