Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soujuurou/Charlotte/Hakunon/Van Gogh(Miner)/BB Dubai/Ptolemy #1811

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
4f6b95f
soujuurou
ArthurKun21 May 1, 2024
b8a9c2e
Fix condition
ArthurKun21 May 1, 2024
7c8f643
Fix the preview
ArthurKun21 May 1, 2024
515f54c
Update wiki
ArthurKun21 May 1, 2024
c357a2f
added the selecting of the command GIF
ArthurKun21 May 1, 2024
c563290
added jp name
ArthurKun21 May 2, 2024
3ab8d23
show the error message
ArthurKun21 Jun 5, 2024
9c7160a
added updated way to handle special targets
ArthurKun21 Jun 5, 2024
1422e75
updated for much clearer exception
ArthurKun21 Jun 5, 2024
f9b2e1e
Merge branch 'master' into soujuurou
ArthurKun21 Aug 19, 2024
e2dded4
Update the servant target
ArthurKun21 Aug 19, 2024
e30d4da
updated battle screen locations
ArthurKun21 Aug 19, 2024
5e63b8b
fix error on deleting strings
ArthurKun21 Aug 19, 2024
3e3a706
Merge branch 'master' into soujuurou
ArthurKun21 Aug 27, 2024
cb8c2eb
Merge branch 'master' into soujuurou
ArthurKun21 Sep 20, 2024
c8c49ca
Merge branch 'master' into soujuurou
ArthurKun21 Oct 2, 2024
9a541a4
Merge branch 'master' into soujuurou
ArthurKun21 Oct 13, 2024
32d1674
renamed to choice 3
ArthurKun21 Nov 12, 2024
914fd7e
updated the servant target
ArthurKun21 Nov 12, 2024
0c05816
added the button hints
ArthurKun21 Nov 12, 2024
fbc6adf
added the hints for the servants that uses the same button
ArthurKun21 Nov 12, 2024
67b81f5
fix duplicate string
ArthurKun21 Nov 12, 2024
1f3a8f7
removed unused string
ArthurKun21 Nov 12, 2024
0d3fb94
updated name
ArthurKun21 Nov 12, 2024
8c1d949
added van gogh
ArthurKun21 Nov 13, 2024
e3445af
simplify the skill slot check
ArthurKun21 Nov 13, 2024
97b000a
simplify kukulkan
ArthurKun21 Nov 13, 2024
dc7cafe
added BB Dubai
ArthurKun21 Nov 13, 2024
aabb13b
added ptolemy
ArthurKun21 Nov 13, 2024
da7e715
renamed melusine to transform in servant target
ArthurKun21 Nov 13, 2024
995c575
moved all of the special into one directory
ArthurKun21 Nov 13, 2024
5c72f3b
renamed target2 to TwoTargets
ArthurKun21 Nov 13, 2024
28e1253
make the hint more concise
ArthurKun21 Nov 13, 2024
d96bccd
converted row to lazy row and buttons when it is not showing
ArthurKun21 Nov 13, 2024
a3be311
added animation for enter and exit
ArthurKun21 Nov 13, 2024
d0bb56a
fix the default behavior for the show last button
ArthurKun21 Nov 13, 2024
073b4f3
Fix spacing
ArthurKun21 Nov 13, 2024
6ac9a1d
added generic option
ArthurKun21 Nov 14, 2024
361bb30
update string
ArthurKun21 Nov 14, 2024
5f71ee1
renamed kukulcan to choice2
ArthurKun21 Nov 14, 2024
ce17b56
added kukulcan jp text
ArthurKun21 Nov 14, 2024
80a6a1f
update the header
ArthurKun21 Nov 14, 2024
ec4bd47
Renamed strings
ArthurKun21 Nov 14, 2024
b7da8e0
added warning about servants with special skills
ArthurKun21 Nov 16, 2024
4ae2e06
updated the warning text when to show
ArthurKun21 Nov 16, 2024
26ae4d7
convert space ishtar to three targets
ArthurKun21 Nov 16, 2024
552e139
added coil
ArthurKun21 Nov 16, 2024
a98d279
update the tooltip into dialog
ArthurKun21 Nov 16, 2024
8679761
added text hint
ArthurKun21 Nov 16, 2024
4a993c3
added padding
ArthurKun21 Nov 16, 2024
e22c227
updated hints
ArthurKun21 Nov 16, 2024
3ded18e
centralized the special commands
ArthurKun21 Nov 16, 2024
8fe83d3
more char update
ArthurKun21 Nov 16, 2024
3de9091
Fix Error
ArthurKun21 Nov 16, 2024
969fd7d
updated code
ArthurKun21 Nov 16, 2024
0372463
moved the start and end char for multi target and special target
ArthurKun21 Nov 16, 2024
c986997
Fix forgot to update
ArthurKun21 Nov 16, 2024
93975c7
moved character to fix linter error
ArthurKun21 Nov 16, 2024
f31415d
Updated to centralized the WaveTurn model
ArthurKun21 Nov 16, 2024
05a76c9
fix size
ArthurKun21 Nov 17, 2024
253fb2f
added bottom padding to null target button
ArthurKun21 Nov 17, 2024
f0b4acc
Update Battle.md
ArthurKun21 Nov 17, 2024
4c2435d
Update Battle.md
ArthurKun21 Nov 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,7 @@ dependencies {
implementation(libs.accompanist.permissions)

implementation(libs.google.android.play.update.ktx)
implementation(libs.coil)
implementation(libs.coil.gif)

}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fun SkillCommandGroup(
errorMessage = ""
} catch (e: Exception) {
// TODO: Localize
errorMessage = "Invalid skill command"
errorMessage = "Invalid skill command ${e.cause?.message}"
}
},
onCancel = { editing = false },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ import io.github.fate_grand_automata.ui.FgaScreen
import io.github.fate_grand_automata.ui.OnPause
import io.github.fate_grand_automata.ui.PreventRtl
import io.github.fate_grand_automata.ui.dialog.FgaDialog
import io.github.fate_grand_automata.ui.skill_maker.special.SkillMakerChoice3
import io.github.fate_grand_automata.ui.skill_maker.special.SkillMakerChoice2
import io.github.fate_grand_automata.ui.skill_maker.special.SkillMakerChoice2Target
import io.github.fate_grand_automata.ui.skill_maker.special.SkillMakerThreeTargets
import io.github.fate_grand_automata.ui.skill_maker.special.SkillMakerTwoTargets

@AndroidEntryPoint
class SkillMakerActivity : AppCompatActivity() {
Expand Down Expand Up @@ -96,10 +101,10 @@ fun SkillMakerUI(
)
}

is SkillMakerNav.Emiya -> {
SkillMakerEmiya(
onArts = { vm.targetSkill(ServantTarget.Left) },
onBuster = { vm.targetSkill(ServantTarget.Right) }
is SkillMakerNav.TwoTargets -> {
SkillMakerTwoTargets(
onTargetLeft = { vm.targetSkill(ServantTarget.Left) },
onTargetRight = { vm.targetSkill(ServantTarget.Right) }
)
}

Expand Down Expand Up @@ -136,58 +141,55 @@ fun SkillMakerUI(
is SkillMakerNav.SkillTarget -> {
SkillMakerTarget(
onSkillTarget = { vm.targetSkill(it) },
showEmiya = nav.skill in listOf(
Skill.Servant.A3,
Skill.Servant.B3,
Skill.Servant.C3
),
onEmiya = {
navigate(SkillMakerNav.Emiya(nav.skill))
showTwoTargets = nav.skill in Skill.Servant.skill3,
onTwoTargets = {
navigate(SkillMakerNav.TwoTargets(nav.skill))
},
showSpaceIshtar = nav.skill in listOf(
Skill.Servant.A2,
Skill.Servant.B2,
Skill.Servant.C2
),
onSpaceIshtar = {
navigate(SkillMakerNav.SpaceIshtar(nav.skill))
showThreeTargets = nav.skill in Skill.Servant.skill2,
onThreeTargets = {
navigate(SkillMakerNav.ThreeTargets(nav.skill))
},
showKukulkan = nav.skill !is Skill.Master,
onKukulkan = {
navigate(SkillMakerNav.Kukulkan(nav.skill))
showChoice2 = nav.skill in Skill.Servant.list,
onChoice2 = {
navigate(SkillMakerNav.Choice2(nav.skill))
},
showMelusine = nav.skill in listOf(
Skill.Servant.A3,
Skill.Servant.B3,
Skill.Servant.C3
),
onMelusine = {
vm.targetSkill(ServantTarget.Melusine)
showTransform = nav.skill in Skill.Servant.skill3,
onTransform = {
vm.targetSkill(ServantTarget.Transform)
},
showChoice3Slot1 = nav.skill in Skill.Servant.skill1,
showChoice3Slot3 = nav.skill in Skill.Servant.skill3,
onChoice3 = { slot ->
navigate(SkillMakerNav.Choice3(nav.skill, slot))
}
)
}

is SkillMakerNav.SpaceIshtar -> {
SkillMakerSpaceIshtar(
is SkillMakerNav.ThreeTargets -> {
SkillMakerThreeTargets(
onSkillTarget = { vm.targetSkill(it) }
)
}

is SkillMakerNav.Kukulkan -> {
SkillMakerKukulkan(
is SkillMakerNav.Choice2 -> {
SkillMakerChoice2(
onOption1 = { vm.targetSkill(ServantTarget.Option1) },
onOption2 = { vm.targetSkill(ServantTarget.Option2) },
goToTarget = nav.skill in listOf(
Skill.Servant.A2,
Skill.Servant.B2,
Skill.Servant.C2
),
onTarget = { firstTarget -> navigate(SkillMakerNav.KukulkanTarget(nav.skill, firstTarget)) }
goToTarget = nav.skill in Skill.Servant.skill2,
onTarget = { firstTarget -> navigate(SkillMakerNav.Choice2Target(nav.skill, firstTarget)) }
)
}

is SkillMakerNav.KukulkanTarget -> {
SkillMakerKukulkanTarget(onSkillTarget = { vm.targetSkill(listOf(nav.firstTarget, it)) })
is SkillMakerNav.Choice2Target -> {
SkillMakerChoice2Target(onSkillTarget = { vm.targetSkill(listOf(nav.firstTarget, it)) })
}
is SkillMakerNav.Choice3 -> {
SkillMakerChoice3(
slot = nav.slot,
onSkillTarget = { servantTarget ->
vm.targetSkill(servantTarget)
},
)
}
}
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,55 @@ package io.github.fate_grand_automata.ui.skill_maker
import io.github.fate_grand_automata.scripts.models.AutoSkillAction
import io.github.fate_grand_automata.scripts.models.ServantTarget
import io.github.fate_grand_automata.scripts.models.Skill
import io.github.fate_grand_automata.scripts.models.SpecialCommand
import io.github.fate_grand_automata.scripts.models.WaveTurn

sealed class SkillMakerEntry {
class Action(val action: AutoSkillAction) : SkillMakerEntry() {
private fun toString(skill: Skill, target: ServantTarget?) =
if (target == null)
"${skill.autoSkillCode}"
else "${skill.autoSkillCode}${target.autoSkillCode}"
private fun toString(skill: Skill, target: ServantTarget?) = when (target) {
null -> "${skill.autoSkillCode}"
else -> {
if (target.specialTarget.isNotEmpty()) {
"${skill.autoSkillCode}${target.autoSkillCode}${target.specialTarget}${SpecialCommand.EndSpecialTarget.autoSkillCode}"
} else {
"${skill.autoSkillCode}${target.autoSkillCode}"
}
}
}

private fun toString(skill: Skill, targets: List<ServantTarget>) = when {
targets.isEmpty() -> "${skill.autoSkillCode}"
targets.size == 1 -> {
if (targets[0].specialTarget.isNotEmpty()) {
"${skill.autoSkillCode}${targets[0].autoSkillCode}${targets[0].specialTarget}${SpecialCommand.EndSpecialTarget.autoSkillCode}"
} else {
"${skill.autoSkillCode}${targets[0].autoSkillCode}"
}
}

else -> {
val start = "${skill.autoSkillCode}${SpecialCommand.StartMultiTarget.autoSkillCode}"
val end = "${SpecialCommand.EndMultiTarget.autoSkillCode}"

private fun toString(skill: Skill, targets: List<ServantTarget>) =
if (targets.isEmpty()) "${skill.autoSkillCode}"
else if (targets.size == 1) "${skill.autoSkillCode}${targets[0].autoSkillCode}"
else "${skill.autoSkillCode}(${targets.map(ServantTarget::autoSkillCode).joinToString("")})"
val middle = targets.joinToString("") { target ->
if (target.specialTarget.isNotEmpty()) {
"${target.autoSkillCode}${target.specialTarget}${SpecialCommand.EndSpecialTarget.autoSkillCode}"
} else {
"${target.autoSkillCode}"
}
}

start + middle + end
}
}

override fun toString() = when (action) {
is AutoSkillAction.Atk -> {
if (action == AutoSkillAction.Atk.noOp()) {
"0"
} else {
val cardsBeforeNP = if (action.cardsBeforeNP > 0) {
"n${action.cardsBeforeNP}"
"${SpecialCommand.CardsBeforeNP.autoSkillCode}${action.cardsBeforeNP}"
} else ""

cardsBeforeNP + action.nps.joinToString("") {
Expand All @@ -33,8 +62,8 @@ sealed class SkillMakerEntry {

is AutoSkillAction.ServantSkill -> toString(action.skill, action.targets)
is AutoSkillAction.MasterSkill -> toString(action.skill, action.target)
is AutoSkillAction.TargetEnemy -> "t${action.enemy.autoSkillCode}"
is AutoSkillAction.OrderChange -> "x${action.starting.autoSkillCode}${action.sub.autoSkillCode}"
is AutoSkillAction.TargetEnemy -> "${SpecialCommand.EnemyTarget.autoSkillCode}${action.enemy.autoSkillCode}"
is AutoSkillAction.OrderChange -> "${SpecialCommand.OrderChange.autoSkillCode}${action.starting.autoSkillCode}${action.sub.autoSkillCode}"
}
}

Expand All @@ -47,11 +76,11 @@ sealed class SkillMakerEntry {
else Action(this).toString()

class Wave(action: AutoSkillAction.Atk) : Next(action) {
override fun toString() = "${action.str()},#,"
override fun toString() = "${action.str()}${WaveTurn.Wave.code}"
}

class Turn(action: AutoSkillAction.Atk) : Next(action) {
override fun toString() = "${action.str()},"
override fun toString() = "${action.str()}${WaveTurn.Turn.code}"
}
}
}
Loading