Home › Forums › Destiny of an Emperor › "Defend" Enhancements
- This topic has 33 replies, 4 voices, and was last updated 13 years, 8 months ago by
sonic.penguin.
-
AuthorPosts
-
August 4, 2012 at 2:59 pm #6172
MiDKnighT
ModeratorOK so here's the proposal for "Defend"
– "Defend" adds "Ji Rou/Guard" status for the defender. That means that physical and tactic damage will be cut in half. This part is already coded.
– When defending, the "guard" status is stackable. That means that other tactics that cut damage will cause the defender's damage to be cut in half twice. For example if "Ji Rou/Guard" is on and the officer is defending, damage will be cut in half twice. This part is already coded.
– When defending, officers will be able to add to their current TP pool. I'm thinking that to add some randomness we could take INT, LSR it 6 times, then take a random number (0-255), LSR that 6 times, then add it to the first number. If INT is less than 220, LSR the final number again. So then we have:
Zhang Fei: Gains 0-1 TP when defending
Guan Yu: Gains 1-2 TP when defending
Zhao Yun: Gains 1-3 TP when defending
Zhuge Liang: Gains 3-6 TP when defending
– Add text to the "so and so is defending" so that it says "so and so is defending and planning new strategies, # TP gained." I wouldn't change the actual text (the modder can do that) but I can give instructions on how to populate the number in the text.
– The big question is whether this enhancement will work only for castle/named battles or for all battles. If it was only for castle/named battles I guess I would need a new text box.
August 4, 2012 at 3:08 pm #44704DragonAtma
Moderator[x] 1a. Defend for all predetermined battles (castles, gates, in-city ambush, Pang Tong, 7003 Lu Bu)
August 4, 2012 at 3:22 pm #44705sonic.penguin
Moderator"Negate was used."
"sonic.penguin has countered DragonAtma's vote strategies!"
"sonic.penguin's armies have conquered DragonAtma."
Plays music… da na na na na na na na… nah nah NAH!!!!!!
August 4, 2012 at 4:05 pm #44706MiDKnighT
ModeratorOK how about a compromise. If it's not a named battle add 1 and LSR the final number again. Then we have:
Castle/Gate Battle:
Zhang Fei: Gains 0-1 TP when defending
Guan Yu: Gains 1-2 TP when defending
Zhao Yun: Gains 1-3 TP when defending
Zhuge Liang: Gains 3-6 TP when defending
Field Battle:
Zhang Fei: Gains 0-1 TP when defending
Guan Yu: Gains 1 TP when defending
Zhao Yun: Gains 1-2 TP when defending
Zhuge Liang: Gains 2-3 TP when defending
August 5, 2012 at 1:57 pm #44707MiDKnighT
ModeratorCompromise #2 – I have TP gains for all battles but add a switch where you can turn it off for non-castle/gate battles.
August 5, 2012 at 5:45 pm #44708sonic.penguin
ModeratorSounds good to me. Next step, find out how you can apply this to make a TP restore item instead of an elixir and also find out where we can adjust the cost/amounts of food to make it more valuable/easier to buy 65,000 at a time rather than 30,000
August 5, 2012 at 7:33 pm #44709MiDKnighT
ModeratorOK it's ready for testing:
0x58D0:
4A4A4A4A4A4A60000000A90E2082C4A4
79B9D061C902D006461266116610B900
62C900D00CBD22624A90064612661166
104CCA98000000000000000000000000
A91E2082C4A5751007A90010034C0099
A678BDD061C902D0F4204088C996B002
A90020C09885B720CB8620C0981865B7
85B7A678204088AAA5B7E0DCB0014A8D
0070186DFB61CDF861900AADF86118ED
FB618D0070ADFB61186D00708DFB61AD
FE6118ED00706900C9F09002A9008DFE
612069D60070A90085B7A678A9809DD0
614C0099000000000000000000000000
0x3A145: A91E2082C4
0x79910: A9012082C44C35A1
0x7A145:A90E2082C44C0099
Switch for castle battles: 0x591F
00 = TP gains for all battles
FF = TP gains for only castle/gate battles
You'll also need to change the "[T-VALUE]is defending" text to say something like:
[T-VALUE]is
defending and
planning new[>]
strategies, [VALUE] [LVL-SLDR-AMT] TP
gained.[>][END]
August 5, 2012 at 8:10 pm #44710MiDKnighT
ModeratorAnd the food thing I had already looked at before but haven't put it in the guide yet.
When you buy food:
$92A3:BD C7 92 LDA $92C7,X @ $92C9 = #$30 A:07 X:02 Y:00 P:nvUBdIzC
$92A6:85 10 STA $0010 = #$10 A:30 X:02 Y:00 P:nvUBdIzC
$92A8:BD CA 92 LDA $92CA,X @ $92CC = #$75 A:30 X:02 Y:00 P:nvUBdIzC
$92AB:85 11 STA $0011 = #$27 A:75 X:02 Y:00 P:nvUBdIzC
X=3 so here you're getting 7530 food (30000). If you want the last option to be 64k then just make those two values FF.
Food values are at: 0x392D7: 2C B8 30 01 0B 75
That translates to 300 (012C), 3000 (0BB8), and 30000 (7530). To change his little menu you'd have to change the values in the 0x3EBD7-0x3EBF9. If you add the doae table to your hex edit editing that should be pretty clear.
August 6, 2012 at 3:40 am #44711sonic.penguin
ModeratorIt says they are gaining TP but they arent…
August 6, 2012 at 12:53 pm #44712MiDKnighT
ModeratorDid you actually use some TP first? It won't go over max TP. It was working in my testing but I'll look again.
August 6, 2012 at 1:17 pm #44713sonic.penguin
Moderatorhad 0 TP
August 6, 2012 at 1:50 pm #44714MiDKnighT
ModeratorI haven't tried with 0 TP yet. Let me do that.
August 6, 2012 at 1:55 pm #44715MiDKnighT
ModeratorIt's working fine for me but I did notice that if you have full TP and you defend the message says you're gaining 255 TP! I'll fix that.
August 6, 2012 at 1:55 pm #44716MiDKnighT
ModeratorIt's working fine for me but I did notice that if you have full TP and you defend the message says you're gaining 255 TP! I'll fix that.
August 6, 2012 at 2:32 pm #44717MiDKnighT
ModeratorIf it's not working for you can you trace it with the trace logger? Open the debugger and the trace logger, set up the trace logger to write to a file. In the debugger set a breakpoint for 9905-9905 and 9981-9981. While you're defending, once the 9905 breakpoint is hit, start logging with trace logger to a file, then continue in the debugger then once the 9981 breakpoint is hit, stop tracing and continue. Then put the trace file on box.com or something :)
-
AuthorPosts
- You must be logged in to reply to this topic.

