@@ -59,8 +59,8 @@ class TrainFragment : Fragment() {
5959        val  repositoryUrl =  " https://api.github.com/repos/helloyanis/rucoy-calculator" 
6060        GitHubReleaseChecker (requireContext(), repositoryUrl).execute()
6161
62-         binding.tickratehelp .setOnClickListener{
63-             Toast .makeText(context," It's how many mobs you can hit with 1 power attack"  , Toast .LENGTH_LONG ).show()
62+         binding.tickhelp .setOnClickListener{
63+             Toast .makeText(context," It's how many mobs you can hit with 1 power attack! "  , Toast .LENGTH_LONG ).show()
6464        }
6565        val  trainstylespinner =  binding.root.findViewById<Spinner >(R .id.trainstylespinner)
6666        trainstylespinner.setOnItemSelectedListener(object  :  AdapterView .OnItemSelectedListener  {
@@ -138,7 +138,7 @@ class TrainFragment : Fragment() {
138138                updateoutput()
139139            }
140140        })
141-         val  editTextTickrate =  binding.root.findViewById<EditText >(R .id.tickrate )
141+         val  editTextTickrate =  binding.root.findViewById<EditText >(R .id.tick )
142142
143143        //  Ajoutez un écouteur de texte à votre EditText
144144        editTextTickrate.addTextChangedListener(object  :  TextWatcher  {
@@ -214,8 +214,8 @@ class TrainFragment : Fragment() {
214214                    binding.root.findViewById<EditText >(R .id.stat).visibility= View .VISIBLE 
215215                    binding.root.findViewById<EditText >(R .id.statgoal).visibility= View .GONE 
216216                    binding.root.findViewById<EditText >(R .id.weaponatk).visibility= View .VISIBLE 
217-                     binding.root.findViewById<EditText >(R .id.tickrate ).visibility= View .GONE 
218-                     binding.root.findViewById<Button >(R .id.tickratehelp ).visibility= View .GONE 
217+                     binding.root.findViewById<EditText >(R .id.tick ).visibility= View .GONE 
218+                     binding.root.findViewById<Button >(R .id.tickhelp ).visibility= View .GONE 
219219                    binding.root.findViewById<EditText >(R .id.hours).visibility= View .GONE 
220220                    if  (binding.root.findViewById<EditText >(R .id.baselevel).text.toString()!= " "   &&  binding.root.findViewById<EditText >(R .id.stat).text.toString()!= " "   &&  binding.root.findViewById<EditText >(R .id.weaponatk).text.toString()!= " "  ) {
221221                        train()
@@ -227,8 +227,8 @@ class TrainFragment : Fragment() {
227227                    binding.root.findViewById<EditText >(R .id.stat).visibility= View .VISIBLE 
228228                    binding.root.findViewById<EditText >(R .id.statgoal).visibility= View .GONE 
229229                    binding.root.findViewById<EditText >(R .id.weaponatk).visibility= View .VISIBLE 
230-                     binding.root.findViewById<EditText >(R .id.tickrate ).visibility= View .VISIBLE 
231-                     binding.root.findViewById<Button >(R .id.tickratehelp ).visibility= View .VISIBLE 
230+                     binding.root.findViewById<EditText >(R .id.tick ).visibility= View .VISIBLE 
231+                     binding.root.findViewById<Button >(R .id.tickhelp ).visibility= View .VISIBLE 
232232                    binding.root.findViewById<EditText >(R .id.hours).visibility= View .GONE 
233233                    if  (binding.root.findViewById<EditText >(R .id.baselevel).text.toString()!= " "   &&  binding.root.findViewById<EditText >(R .id.stat).text.toString()!= " "   &&  binding.root.findViewById<EditText >(R .id.weaponatk).text.toString()!= " "  ) {
234234                        ptrain()
@@ -240,8 +240,8 @@ class TrainFragment : Fragment() {
240240                    binding.root.findViewById<EditText >(R .id.stat).visibility= View .VISIBLE 
241241                    binding.root.findViewById<EditText >(R .id.statgoal).visibility= View .VISIBLE 
242242                    binding.root.findViewById<EditText >(R .id.weaponatk).visibility= View .GONE 
243-                     binding.root.findViewById<EditText >(R .id.tickrate ).visibility= View .GONE 
244-                     binding.root.findViewById<Button >(R .id.tickratehelp ).visibility= View .GONE 
243+                     binding.root.findViewById<EditText >(R .id.tick ).visibility= View .GONE 
244+                     binding.root.findViewById<Button >(R .id.tickhelp ).visibility= View .GONE 
245245                    binding.root.findViewById<EditText >(R .id.hours).visibility= View .VISIBLE 
246246                    if (binding.root.findViewById<EditText >(R .id.stat).text.toString()!= " "  ) {
247247                        offline()
@@ -433,7 +433,11 @@ class TrainFragment : Fragment() {
433433        val  weaponatk =  binding.root.findViewById<EditText >(R .id.weaponatk).text.toString().toDouble()
434434        val  base =  binding.root.findViewById<EditText >(R .id.baselevel).text.toString().toDouble()
435435        val  classtype =  binding.root.findViewById<Spinner >(R .id.classspinner).selectedItemPosition
436-         val  tick =  4 .toDouble() // Change this later
436+         var  tick =  4 .toDouble()
437+         if (binding.root.findViewById<EditText >(R .id.tick).text.toString()!= " "  ){
438+             tick =  binding.root.findViewById<EditText >(R .id.tick).text.toString().toDouble() // Change this later
439+         }
440+ 
437441        val  max_raw_damage:  Double 
438442        val  min_raw_damage:  Double 
439443
0 commit comments