Skip to content

Commit

Permalink
0.4.2a lang fix, manifest commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
egoal committed May 21, 2020
1 parent e2e072a commit 5db19c1
Show file tree
Hide file tree
Showing 20 changed files with 55 additions and 296 deletions.
4 changes: 2 additions & 2 deletions core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.egoal.darkestpixeldungeon"
android:installLocation="auto"
android:versionCode="35"
android:versionName="0.4.2">
android:versionCode="36"
android:versionName="0.4.2a">

<uses-permission android:name="android.permission.VIBRATE" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.egoal.darkestpixeldungeon.messages.Messages
import com.egoal.darkestpixeldungeon.ui.BuffIndicator
import com.egoal.darkestpixeldungeon.utils.GLog
import com.watabou.utils.Bundle
import kotlin.math.ceil

/**
* Created by 93942 on 9/6/2018.
Expand Down Expand Up @@ -39,7 +40,7 @@ class Mending : Buff() {
}

override fun act(): Boolean {
val v = Math.ceil((recoveryValue / 4f).toDouble()).toInt()
val v = ceil(recoveryValue / 4f).toInt()
recoveryValue -= v
if (v <= 0.1) {
detach()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ class Hero : Char() {
// heart
buff(HeartOfSatan.Regeneration::class.java)?.let {
if (it.isCursed)
reg = if (reg >= 0f) -0.025f else reg * 1.25f
reg = if (reg >= 0f) -0.025f else reg * 1.5f
else
reg += HT.toFloat() * 0.004f * Math.pow(1.08, it.itemLevel().toDouble()).toFloat()
reg += HT.toFloat() * 0.003f * 1.18f.pow(it.itemLevel())
}

// ring
Expand All @@ -184,9 +184,6 @@ class Hero : Char() {
reg += if (it.cursed) -0.1f else (0.05f + reg * 0.2f)
}

// rune
if (buff(MendingRune.Recovery::class.java) != null) reg += 1f

if (hlvl >= Hunger.HUNGRY) reg *= 0.5f

return reg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.egoal.darkestpixeldungeon.items.unclassified

import com.egoal.darkestpixeldungeon.Assets
import com.egoal.darkestpixeldungeon.DungeonTilemap
import com.egoal.darkestpixeldungeon.actors.Actor
import com.egoal.darkestpixeldungeon.actors.buffs.*
import com.egoal.darkestpixeldungeon.actors.hero.Hero
import com.egoal.darkestpixeldungeon.effects.Flare
Expand All @@ -12,6 +13,7 @@ import com.egoal.darkestpixeldungeon.sprites.ItemSprite
import com.egoal.darkestpixeldungeon.sprites.ItemSpriteSheet
import com.egoal.darkestpixeldungeon.utils.GLog
import com.watabou.noosa.audio.Sample
import com.watabou.utils.Bundle
import com.watabou.utils.Random
import kotlin.math.min

Expand Down Expand Up @@ -60,10 +62,38 @@ class MendingRune : Rune() {
override fun glowing(): ItemSprite.Glowing = ItemSprite.Glowing(0x00ff00)

override fun affect(hero: Hero) {
Buff.prolong(hero, Recovery::class.java, 200f)
Buff.affect(hero, Recovery::class.java).duration = 200f
}

class Recovery : FlavourBuff()
class Recovery : Buff() {
var duration = 0f

init {
type = buffType.POSITIVE
}

override fun act(): Boolean {
if (target.HP < target.HT) target.HP++

duration -= Actor.TICK
if (duration <= 0f) detach()

spend(Actor.TICK)
return true
}

override fun storeInBundle(bundle: Bundle) {
super.storeInBundle(bundle)
bundle.put("duration", duration)
}

override fun restoreFromBundle(bundle: Bundle) {
super.restoreFromBundle(bundle)
duration = bundle.getFloat("duration")
}

override fun toString(): String = Messages.get(this, "name")
}
}

class CriticalRune : Rune() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import com.egoal.darkestpixeldungeon.items.books.TomeOfPerk
import com.egoal.darkestpixeldungeon.items.rings.RingOfSharpshooting
import com.egoal.darkestpixeldungeon.items.scrolls.ScrollOfRemoveCurse
import com.egoal.darkestpixeldungeon.items.unclassified.Gold
import com.egoal.darkestpixeldungeon.items.unclassified.MendingRune
import com.egoal.darkestpixeldungeon.items.weapon.melee.BattleGloves
import com.egoal.darkestpixeldungeon.items.weapon.missiles.Dart
import com.egoal.darkestpixeldungeon.levels.traps.PrizeTrap
Expand Down Expand Up @@ -145,6 +146,8 @@ class VillageLevel : RegularLevel() {
// identify()
// level(5)
// }, xy2cell(16, 30))

// drop(MendingRune(), xy2cell(17, 5))
}

private fun putMobAt(cls: Class<out Mob>, x: Int, y: Int): Mob {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ enum class Languages(val nativeName: String,
val code: String get() = locale.toString()

companion object {
fun matchLocale(locale: Locale): Languages = values().find { it.locale == locale } ?: CHINESE
fun matchLocale(locale: Locale): Languages = values().find { it.locale == locale } ?: ENGLISH

fun matchCode(code: String): Languages = values().find { it.code == code } ?: CHINESE
fun matchCode(code: String): Languages = values().find { it.code == code } ?: ENGLISH
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,12 @@ public static Languages lang() {
public static void setup(Languages lang) {
strings = new HashMap<>();
Messages.lang = lang;
Locale locale = lang.getLocale();
Locale locale = lang.getLocale();

Log.d("dpd", locale.toString());

for (String file : prop_files) {
ResourceBundle bundle = ResourceBundle.getBundle(file, locale);
Log.d("dpd", bundle.getLocale().toString());
Enumeration<String> keys = bundle.getKeys();
while (keys.hasMoreElements()) {
String key = keys.nextElement();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,7 @@ items.unclassified.regenerationrune.desc=Rune of regeneration can permantely boo

items.unclassified.mendingrune.name=Rune of Mending
items.unclassified.mendingrune.desc=Rune of mending can temporately boost life restoration greatly.
items.unclassified.mendingrune$recovery.name=治愈

items.unclassified.criticalrune.name=Rune of Critical
items.unclassified.criticalrune.desc=Rune of critical can greatly reinforce your fight skills, making all of your blows critical during a short period of time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,7 @@ items.unclassified.regenerationrune.desc=恢复神符能永久加强使用者的

items.unclassified.mendingrune.name=治愈神符
items.unclassified.mendingrune.desc=治愈神符能在一定时间内极大的加强你的生命恢复速度。
items.unclassified.mendingrune$recovery.name=治愈

items.unclassified.criticalrune.name=暴击神符
items.unclassified.criticalrune.desc=使用暴击神符将极大地强化你的战斗,使你在短时间内刀刀致命。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,6 @@ scenes.changesscene.info0.3.2a=[190727]修复与调整;\n\n【修复】\n-修
scenes.changesscene.info0.4.0=[191005]全新特质系统,新的敌人与物品,伤害计算与平衡性改动;\n\n【更新】:\n-全新特质系统:重做了特质结构,新增超过30种特质,从2级开始英雄每4级将获得新的能力,作为代价,每章节升级卷轴数量下调到2;\n-新的敌人灰烬头骨加入到地牢;\n-古老者之眼,尖刺大盾等加入到地牢;\n【调整】:\n-魔法伤害现在穿透护甲格挡,英雄具有初始魔抗,酸元素从游戏中移除,魔法抗性现在与元素抗性独立结算;\n-众多怪物的数值调整,现在怪物移动时不会随手关门;\n-特质:露水瓶更多回复,现在由女巫持有,而非女猎手;\n-影之灵龛,蓄血圣杯等物品加强,拳套升级时获得攻速加成,不再受磨刀石作用,短剑等武器力量需求降低1点;\n【其他】:\n-为盾系武器添加了完整的描述;\n-英雄选择界面改动以准备排列更多英雄;
scenes.changesscene.info0.4.1=[191228]新的特质,新物品与平衡性改动;\n\n【更新】:\n-新增10种特质;现在升级获得特质时总是具有一次随机机会;\n-现在英雄在12级获得进阶机会,精通之书从地牢中移除,天狗现在掉落一本天赋之书;\n-调整了装备的力量需求与等级的关系,现在力量下降分别在+1、+3、+5、+7...\n-提高了投掷武器的掉落,新增阿贝尔神杖替换注魂法杖,提高了几乎所有法杖的伤害;\n-新增压力回复道具仪式匕首;点金手,镰刀,带裂纹的银币等加入地牢;\n-实验功能自言自语的英雄与可控制的盟友;\n-宝藏与惊惧陷阱加入到地牢;\n【调整】:\n-压力调整,现在压力在游戏种的浮动将更为明显;命中添加一项闪避几率判定;\n-剧毒法杖现在具有命中伤害;巨斧现在具有50%溅射;磨刀石现在影响武器的力量需求;\n-灰烬头骨不再具有夜视能力;\n【其他】:\n-更详细的属性显示,人物对话界面改动;\n日志滚动等问题修正;
scenes.changesscene.info0.4.2=[200426]新单位,新物品,全新地牢挑战;\n\n【更新】:\n-红恶魔加入到地牢,在地牢较深处出现;新的稀有怪速射炮加入到地牢;新村民路人加入到第0层;\n-元素、韧性、精准之戒从地牢中移除,新增三枚戒指;新的头饰来打面具加入地牢;\n-移除旧有挑战选项,新增地牢石碑,提供全新的挑战内容,包括一项新手选项;\n【调整】:\n-地牢生成算法微调;\n-为矮人国王添加了怒气技能;\n-十字军头盔现在总是能减免远程伤害;恢复药水总量增加,闪避之戒现在提供闪避几率而非潜行点;硬币、尖刺大盾等物品数值调整;\n【其他】:\n-现在可以和商人交换位置;全新单位面板,血条数值,物品排序,天赋延迟选择等细节;排行榜现在容纳至多30个记录;\n-无限炼金、暴击商人等问题修正;
scenes.changesscene.info0.4.2a=[200521]繁体中文加入,修复与几个新物品;\n\n【调整】\n-急救试剂,干枯羊腿等物品;\n-萃取瓶现在可置于快捷栏;现在治愈神符的回复效果以独立buff给出;酿造强化现在使用伪随机,不再可以升级;天赋异禀、体质药剂、撒旦之心等微调;\n\n【其他】\n-繁体中文现在可用;大部分徽章条件现在可见;\n-一些修复;

scenes.welcomescene.update_msg=-New perks;\n-New items;\n-Overhauled Challenges;
scenes.welcomescene.update_msg=-Traditional Chinese;\n-Badges and few of new items;
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,6 @@ scenes.changesscene.info0.3.2a=[190727]修复与调整;\n\n【修复】\n-修
scenes.changesscene.info0.4.0=[191005]全新特质系统,新的敌人与物品,伤害计算与平衡性改动;\n\n【更新】:\n-全新特质系统:重做了特质结构,新增超过30种特质,从2级开始英雄每4级将获得新的能力,作为代价,每章节升级卷轴数量下调到2;\n-新的敌人灰烬头骨加入到地牢;\n-古老者之眼,尖刺大盾等加入到地牢;\n【调整】:\n-魔法伤害现在穿透护甲格挡,英雄具有初始魔抗,酸元素从游戏中移除,魔法抗性现在与元素抗性独立结算;\n-众多怪物的数值调整,现在怪物移动时不会随手关门;\n-特质:露水瓶更多回复,现在由女巫持有,而非女猎手;\n-影之灵龛,蓄血圣杯等物品加强,拳套升级时获得攻速加成,不再受磨刀石作用,短剑等武器力量需求降低1点;\n【其他】:\n-为盾系武器添加了完整的描述;\n-英雄选择界面改动以准备排列更多英雄;
scenes.changesscene.info0.4.1=[191228]新的特质,新物品与平衡性改动;\n\n【更新】:\n-新增10种特质;现在升级获得特质时总是具有一次随机机会;\n-现在英雄在12级获得进阶机会,精通之书从地牢中移除,天狗现在掉落一本天赋之书;\n-调整了装备的力量需求与等级的关系,现在力量下降分别在+1、+3、+5、+7...\n-提高了投掷武器的掉落,新增阿贝尔神杖替换注魂法杖,提高了几乎所有法杖的伤害;\n-新增压力回复道具仪式匕首;点金手,镰刀,带裂纹的银币等加入地牢;\n-实验功能自言自语的英雄与可控制的盟友;\n-宝藏与惊惧陷阱加入到地牢;\n【调整】:\n-压力调整,现在压力在游戏种的浮动将更为明显;命中添加一项闪避几率判定;\n-剧毒法杖现在具有命中伤害;巨斧现在具有50%溅射;磨刀石现在影响武器的力量需求;\n-灰烬头骨不再具有夜视能力;\n【其他】:\n-更详细的属性显示,人物对话界面改动;\n日志滚动等问题修正;
scenes.changesscene.info0.4.2=[200426]新单位,新物品,全新地牢挑战;\n\n【更新】:\n-红恶魔加入到地牢,在地牢较深处出现;新的稀有怪速射炮加入到地牢;新村民路人加入到第0层;\n-元素、韧性、精准之戒从地牢中移除,新增三枚戒指;新的头饰来打面具加入地牢;\n-移除旧有挑战选项,新增地牢石碑,提供全新的挑战内容,包括一项新手选项;\n【调整】:\n-地牢生成算法微调;\n-为矮人国王添加了怒气技能;\n-十字军头盔现在总是能减免远程伤害;恢复药水总量增加,闪避之戒现在提供闪避几率而非潜行点;硬币、尖刺大盾等物品数值调整;\n【其他】:\n-现在可以和商人交换位置;全新单位面板,血条数值,物品排序,天赋延迟选择等细节;排行榜现在容纳至多30个记录;\n-无限炼金、暴击商人等问题修正;
scenes.changesscene.info0.4.2a=[200521]繁体中文加入,修复与几个新物品;\n\n【调整】\n-急救试剂,干枯羊腿等物品;\n-萃取瓶现在可置于快捷栏;现在治愈神符的回复效果以独立buff给出;酿造强化现在使用伪随机,不再可以升级;天赋异禀、体质药剂、撒旦之心等微调;\n\n【其他】\n-繁体中文现在可用;大部分徽章条件现在可见;\n-一些修复;

scenes.welcomescene.update_msg=-新单位\n-新物品;\n-全新地牢挑战
scenes.welcomescene.update_msg=-繁体中文加入\n-可见徽章与几个新物品
Loading

0 comments on commit 5db19c1

Please sign in to comment.