上传文件

This commit is contained in:
CaptB committed 2026-11-05 21:32:13 +08:00
1 parent d24531851a
commit 9ae55bcc64
12 files changed
+2529

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
import config
def Plant():
while True:
dead = 0
for x in range(get_world_size()):
for y in range(get_world_size()):
if get_entity_type() != None:
if get_entity_type() != Entities.Pumpkin:
dead += 1
if can_harvest():
harvest()
if num_items(Items.Carrot) > config.pumpkintimes * get_world_size():
if get_ground_type() != Grounds.Soil:
till()
plant(Entities.Pumpkin)
if get_water() < config.waterpercent:
use_item(Items.Water)
else:
dead += 1
if num_items(Items.Carrot) > config.pumpkintimes * get_world_size():
if get_ground_type() != Grounds.Soil:
till()
plant(Entities.Pumpkin)
if get_water() < config.waterpercent:
use_item(Items.Water)
move(North)
move(East)
if dead == 0:
for a in range(get_pos_x()):
move(West)
for b in range(get_pos_y()):
move(South)
harvest()
break