update
This commit is contained in:
@@ -373,6 +373,58 @@ class _BattleScreenState extends State<BattleScreen> {
|
||||
}).toList(),
|
||||
),
|
||||
),
|
||||
if (isEnemy)
|
||||
Consumer<BattleProvider>(
|
||||
builder: (context, provider, child) {
|
||||
if (provider.currentEnemyIntent != null && !character.isDead) {
|
||||
final intent = provider.currentEnemyIntent!;
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black54,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(color: Colors.redAccent),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
"INTENT",
|
||||
style: TextStyle(
|
||||
color: Colors.redAccent,
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
intent.type == EnemyActionType.attack
|
||||
? Icons.flash_on
|
||||
: Icons.shield,
|
||||
color: Colors.yellow,
|
||||
size: 16,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
intent.description,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
return const SizedBox.shrink();
|
||||
},
|
||||
),
|
||||
if (!isEnemy) ...[
|
||||
Text("Armor: ${character.armor}"),
|
||||
Text("ATK: ${character.totalAtk}"),
|
||||
|
||||
Reference in New Issue
Block a user